-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the build system so the right config files get added in with …
…initial development
- Loading branch information
1 parent
d7f2f0b
commit df1ad7a
Showing
9 changed files
with
42 additions
and
27 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { execSync } = require('child_process'); | ||
var fs = require('fs'); | ||
|
||
console.log(process.argv) | ||
if (process.argv[2] === 'dev') { | ||
console.log('checking if settings already exist...'); | ||
if (!fs.existsSync('./public/settings.json')) { | ||
console.log('copying dev settings over'); | ||
fs.copyFileSync('./settings.dev.json', './public/settings.json'); | ||
} else { | ||
console.log('settings exist...doing nothing') | ||
} | ||
} else if (process.argv[2] === 'prod') { | ||
const gitInfo = execSync('git describe --tags --long').toString(); | ||
console.log('Packaging version ' + gitInfo); | ||
|
||
let prodConfig = JSON.parse(fs.readFileSync('./settings.prod.json', 'utf8')); | ||
prodConfig.version = gitInfo.replace('\r', '').replace('\n', ''); | ||
|
||
fs.writeFileSync('./build/settings.json', JSON.stringify(prodConfig, null, 2), 'utf8'); | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"malcolmSocket": "ws://localhost:8000/ws", | ||
"version": "1.0.0" | ||
} |
File renamed without changes.
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
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
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