~xdavidwu/systemd-apkbuilds

9f97224873981e07bf53f14e5abcc9a9d9b92460 — xdavidwu 2 years ago 02552da
sumbit-build: add dry-run mode
1 files changed, 6 insertions(+), 1 deletions(-)

M submit-build
M submit-build => submit-build +6 -1
@@ 1,6 1,11 @@
#!/bin/sh
set -e

if [ "$1" = "-n" ]; then
	extra="| del(.tasks[] | select(.deploy))"
	extra_note="(test)\ "
	shift
fi
pkg=$(basename "$1")
. "$pkg"/APKBUILD
yq ".environment.package = \"$pkg\"" < build.yml | ssh builds@builds.xdavidwu.link "submit -n$pkgname\ $pkgver-$pkgrel"
yq ".environment.package = \"$pkg\" $extra" < build.yml | ssh builds@builds.xdavidwu.link "submit -n$extra_note$pkgname\ $pkgver-$pkgrel"