Skip to content
This repository was archived by the owner on Oct 6, 2021. It is now read-only.

Commit

Permalink
Fix core updates. Add genesis data to Keyggdrasil.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Jun 4, 2016
1 parent ef91882 commit ab5d481
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
15 changes: 15 additions & 0 deletions src/Installer/sql/pgsql/99-inserts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,19 @@ Click "Bridge" at the bottom to take control of your Airship.',
'Markdown',
TRUE,
1
);

-- GENESIS BLOCKS:
INSERT INTO airship_tree_updates (channel, channelupdateid, data, merkleroot) VALUES
(
'paragonie',
1,
'{"action":"CREATE","date_generated":"2016-06-04T16:00:00","public_key":"1d9b44a5ec7be970dcb07efa81e661cb493f700953c0c26e5161b9cf0637e7f1","supplier":"pragonie","type":"master","master":null}',
'99b4556c9506fd1742ca837e534553c9dcff5cdfae3ef57c74eb6175c6c8ffb9da04102a6a83c5139efd83c5e6f52cabc557ed0726652e041e214b8a677247ea'
),
(
'paragonie',
2,
'{"action":"CREATE","date_generated":"2016-06-04T16:05:00","public_key":"6731558f53c6edf15c7cc1e439b15c18d6dfc1fd2c66f9fda8c56cfe7d37110b","supplier":"pragonie","type":"signing","master":"{\"public_key\":\"1d9b44a5ec7be970dcb07efa81e661cb493f700953c0c26e5161b9cf0637e7f1\",\"signature\":\"017bb2dbe6fa75d3240f330be532bf8d9aced0654f257b5670edbd44c52f892459b5b314f095cd1df65346035a4b927dd4edbcfee677d4ebd5f861d6789fc301\"}"}',
'940c0456c19d3606b27c89d15a82523f8fdb83928b4d27e027058a279665b124afc7af4188098704058bf067f0349b32c9a8c7f244499623d5d9f7b6e1fa986d'
);
13 changes: 11 additions & 2 deletions tools/hangar/src/Commands/Assemble.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@ protected function buildPhar(string $workspace, array $args = []): bool
$this->pharAlias
);
$phar->buildFromDirectory($workspace);
$metaData = $this->getMetadata();
$metaData = $this->getRawMetadata();
$metaData['commit'] = $this->getGitCommitHash();
$phar->setMetadata($metaData);

echo 'Built at: ', AIRSHIP_LOCAL_CONFIG . DIRECTORY_SEPARATOR . $this->pharname, "\n";
echo 'Git commit for this build: ', $metaData['commit'], "\n";
return $this->cleanupWorkspace($workspace);
}
Expand Down Expand Up @@ -229,6 +230,14 @@ protected function getMetadata(): string
return \json_encode($this->metadata);
}

/**
* @return string
*/
protected function getRawMetadata(): array
{
return $this->metadata;
}

/**
* Place all the files in a workspace directory to prepare for Phar assembly.
*
Expand Down Expand Up @@ -274,7 +283,7 @@ protected function setupFiles(string $workspace, array $args = [])
*/
public function getGitCommitHash(): string
{
$projectRoot = $this->config['dir'];
$projectRoot = $this->session['dir'];
if (!\is_dir($projectRoot . '/.git')) {
throw new \Exception(".git directory not found!");
}
Expand Down
6 changes: 3 additions & 3 deletions tools/hangar/src/hangar.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* This script is the entry point for all Hangar commands.
*/
\define('AIRSHIP_ROOT', __DIR__);
\define('HANGAR_ROOT', __DIR__);
$homeDir = isset($_SERVER['HOME'])
? $_SERVER['HOME']
: \posix_getpwuid(posix_getuid())['dir'];
Expand All @@ -27,10 +27,10 @@
/**
* 2. Load the configuration
*/
if (\is_readable(AIRSHIP_LOCAL_CONFIG."/config.json")) {
if (\is_readable(AIRSHIP_LOCAL_CONFIG."/hangar.json")) {
// Allow people to edit the JSON config and define their own locations
$config = \json_decode(
\file_get_contents(AIRSHIP_LOCAL_CONFIG."/config.json"),
\file_get_contents(AIRSHIP_LOCAL_CONFIG."/hangar.json"),
true
);
} else {
Expand Down

0 comments on commit ab5d481

Please sign in to comment.