-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build command now acts like test command but without the testing.
- Loading branch information
1 parent
1c77316
commit c3132e1
Showing
1 changed file
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}); | ||
}); |