Fixed deploy commands
This commit is contained in:
parent
26ee6c12bb
commit
de6576f42d
1
TODO.md
1
TODO.md
|
@ -4,6 +4,7 @@ To-Do-list
|
|||
Phaser 3 migration
|
||||
------------------
|
||||
|
||||
* Restore fullscreen mode (and add a fullscreen incentive before the menu)
|
||||
* Fix valuebar requiring to be in root display list
|
||||
* Restore unit tests about boundaries (in UITools)
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
"test": "run ci",
|
||||
"start": "run continuous",
|
||||
"codecov": "remap-istanbul -i out/coverage/coverage.json -o out/coverage/mapped.json -t json && codecov -f out/coverage/mapped.json",
|
||||
"deploy": "run deploy"
|
||||
"deploy": "run deploy",
|
||||
"deployx": "run deployx"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -42,4 +43,4 @@
|
|||
"phaser": "^3.10.0",
|
||||
"process-pool": "^0.3.5"
|
||||
}
|
||||
}
|
||||
}
|
13
runfile.js
13
runfile.js
|
@ -177,13 +177,17 @@ async function optimize() {
|
|||
/**
|
||||
* Deploy to production
|
||||
*/
|
||||
async function deploy(task) {
|
||||
async function deploy(task, experimental = false) {
|
||||
await build(true);
|
||||
await optimize();
|
||||
await exec(`rsync -avz --delete ./out/ hosting.thunderk.net:/srv/website/spacetac${experimental ? "x" : ""}/`);
|
||||
}
|
||||
|
||||
let branch = await run('git rev-parse --abbrev-ref HEAD', { stdio: 'pipe', async: true });
|
||||
let suffix = (branch == "master") ? "" : "x";
|
||||
await exec(`rsync -avz --delete ./out/ hosting.thunderk.net:/srv/website/spacetac${suffix}/`);
|
||||
/**
|
||||
* Deploy to production (experimental)
|
||||
*/
|
||||
async function deployx(task) {
|
||||
await deploy(task, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -265,6 +269,7 @@ module.exports = {
|
|||
build: command(build),
|
||||
test: command(test),
|
||||
deploy: command(deploy),
|
||||
deployx: command(deployx),
|
||||
serve: command(serve),
|
||||
continuous: command(continuous),
|
||||
ci: command(ci)
|
||||
|
|
Loading…
Reference in New Issue