|
|
|
@ -7,33 +7,28 @@ export const options = [ |
|
|
|
|
['--dry-run', "Don't actually update, just pretend."], |
|
|
|
|
['--no-content', "DO NOT deploy the render content, not the app."], |
|
|
|
|
['--no-app', "DO NOT deploy the app, not the content."], |
|
|
|
|
['--target', "rsync the results to this directory", "/var/www/learnjsthehardway.com"], |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
const config = { |
|
|
|
|
source_dir: "../ljsthw-private" |
|
|
|
|
}; |
|
|
|
|
export const required = [ |
|
|
|
|
['--target <dir>', "rsync the results to this directory"], |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
export const main = (opts) => { |
|
|
|
|
exec_i("git pull"); |
|
|
|
|
|
|
|
|
|
// update the modules git too
|
|
|
|
|
const cwd = process.cwd(); |
|
|
|
|
process.chdir(config.source_dir); |
|
|
|
|
exec_i("git pull"); |
|
|
|
|
process.chdir(cwd) |
|
|
|
|
|
|
|
|
|
const dry_run = opts.dryRun ? "--dry-run" : ""; |
|
|
|
|
|
|
|
|
|
if(opts.app) { |
|
|
|
|
exec_i("npm run knex migrate:latest"); |
|
|
|
|
exec_i("npm run build"); |
|
|
|
|
// reset the icons because we need them all for the demo
|
|
|
|
|
exec_i("node bando.js icons"); |
|
|
|
|
exec_i(`rsync -av --delete admin/bando public/`); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(opts.content) { |
|
|
|
|
gen_players.main(); |
|
|
|
|
exec_i("node ./bando.js rendered"); |
|
|
|
|
exec_i("node ./bando.js load"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const ext_list = ["html", "css", "js", "svg", "xml", "md"]; |
|
|
|
|