Add 'make sync' for my convenience
This commit is contained in:
parent
87d7e6df8a
commit
86c29aef4c
8
Makefile
8
Makefile
|
@ -151,12 +151,16 @@ download:
|
|||
mkdir -p $(BUILD)
|
||||
aws s3 cp $(S3_DEB) $(BUILD)/$(DEB)
|
||||
|
||||
### Publish artifacts to registries
|
||||
|
||||
.PHONY: plan
|
||||
plan:
|
||||
node tools/plan-publish.js
|
||||
|
||||
.PHONY: sync
|
||||
sync:
|
||||
node tools/plan-publish.js --execute
|
||||
|
||||
### Publish artifacts to registries
|
||||
|
||||
.PHONY: push
|
||||
push:
|
||||
@: $${I} $${DOCKER_REPO}
|
||||
|
|
|
@ -175,7 +175,11 @@ function printTable(data, headers) {
|
|||
// Parse command-line arguments, run main functionality, and exit.
|
||||
async function main() {
|
||||
const program = new Command();
|
||||
program.option("--publish", "deploy newly built artifacts");
|
||||
program.option("--execute", "pull and build artifacts locally");
|
||||
program.option(
|
||||
"--publish",
|
||||
"with --execute, also deploy newly built artifacts"
|
||||
);
|
||||
program.option("--show-all", "show also unchanged artifacts");
|
||||
program.option(
|
||||
"--omit-unneeded-downloads",
|
||||
|
@ -212,7 +216,11 @@ async function main() {
|
|||
} else if (local === desired && remote !== desired) {
|
||||
action = "publish local";
|
||||
details = `${remote} => ${desired}`;
|
||||
func = upload;
|
||||
func = async () => {
|
||||
if (program.publish) {
|
||||
await upload();
|
||||
}
|
||||
};
|
||||
couldPrune = false;
|
||||
noop = false;
|
||||
} else {
|
||||
|
@ -224,7 +232,9 @@ async function main() {
|
|||
}
|
||||
func = async () => {
|
||||
await build();
|
||||
await upload();
|
||||
if (program.publish) {
|
||||
await upload();
|
||||
}
|
||||
};
|
||||
couldPrune = false;
|
||||
noop = false;
|
||||
|
@ -283,7 +293,7 @@ async function main() {
|
|||
console.log();
|
||||
}
|
||||
tableData = filteredTableData;
|
||||
if (program.publish) {
|
||||
if (program.execute) {
|
||||
for (const { func } of tableData) {
|
||||
await func();
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ trap cleanup EXIT
|
|||
|
||||
make pull-base scripts
|
||||
|
||||
node tools/plan-publish.js --publish --show-all --omit-unneeded-downloads \
|
||||
node tools/plan-publish.js --execute --publish --show-all --omit-unneeded-downloads \
|
||||
| tee "${tmpdir}/plan-publish.out"
|
||||
|
||||
if ! grep -F "plan-publish is tagging app image" "${tmpdir}/plan-publish.out"; then
|
||||
|
|
Loading…
Reference in New Issue