Skip to content

Commit

Permalink
Build command now acts like test command but without the testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
thekevinbrown committed Apr 16, 2019
1 parent 1c77316 commit c3132e1
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions src/cli/lamington-build.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
import { buildAll } from './utils';
import { eosIsReady, startEos, runTests, stopContainer, buildAll } from './utils';
import { GitIgnoreManager } from '../gitignoreManager';
import { ConfigManager } from '../configManager';

buildAll().catch(error => {
throw error;
const run = async () => {
if (await eosIsReady()) {
console.log('EOS is running. Stopping...');
await stopContainer();
}

// This initialises the config
console.log('Getting configuration...');
await ConfigManager.initWithDefaults();

// This ensures we have our .gitignore inside the .lamington directory
await GitIgnoreManager.createIfMissing();

console.log('Starting EOS...');
await startEos();

console.log('Building smart contracts...');
await buildAll();

console.log('Stopping EOS...');
await stopContainer();
};

run().catch(error => {
console.log('Stopping EOS...');
stopContainer().then(() => {
throw error;
});
});

0 comments on commit c3132e1

Please sign in to comment.