release/build.sh: Fix tty issues and add --lockfile-force

This commit is contained in:
Anmol Sethi 2022-11-16 07:47:55 -08:00
parent 61bf09d088
commit 36af87582b
No known key found for this signature in database
GPG key ID: 25BC68888A99A8BA
2 changed files with 11 additions and 4 deletions

View file

@ -5,7 +5,7 @@ cd -- "$(dirname "$0")/../.."
help() {
cat <<EOF
usage: $0 [--rebuild] [--local] [--dry-run] [--run=regex] [--host-only]
usage: $0 [--rebuild] [--local] [--dry-run] [--run=regex] [--host-only] [--lockfile-force]
$0 builds D2 release archives into ./ci/release/build/<version>/d2-<VERSION>-<OS>-<ARCH>.tar.gz
@ -35,6 +35,9 @@ Flags:
--version vX.X.X
Use to overwrite the version detected from git.
--lockfile-force
Forcefully take ownership of remote builder lockfiles.
EOF
}
@ -71,6 +74,10 @@ main() {
flag_nonemptyarg && shift "$FLAGSHIFT"
VERSION=$FLAGARG
;;
lockfile-force)
flag_noarg && shift "$FLAGSHIFT"
LOCKFILE_FORCE=1
;;
'')
shift "$FLAGSHIFT"
break
@ -165,7 +172,7 @@ build_remote_macos() {
trap unlockfile_ssh EXIT
sh_c ssh "$REMOTE_HOST" mkdir -p src
sh_c rsync --archive --human-readable --delete ./ "$REMOTE_HOST:src/d2/"
sh_c ssh -tttt "$REMOTE_HOST" "DRY_RUN=${DRY_RUN-} \
sh_c ssh "$REMOTE_HOST" "DRY_RUN=${DRY_RUN-} \
HW_BUILD_DIR=$HW_BUILD_DIR \
VERSION=$VERSION \
OS=$OS \
@ -183,7 +190,7 @@ build_remote_linux() {
trap unlockfile_ssh EXIT
sh_c ssh "$REMOTE_HOST" mkdir -p src
sh_c rsync --archive --human-readable --delete ./ "$REMOTE_HOST:src/d2/"
sh_c ssh -tttt "$REMOTE_HOST" "DRY_RUN=${DRY_RUN-} \
sh_c ssh "$REMOTE_HOST" "DRY_RUN=${DRY_RUN-} \
HW_BUILD_DIR=$HW_BUILD_DIR \
VERSION=$VERSION \
OS=$OS \

2
ci/sub

@ -1 +1 @@
Subproject commit 65baeaa0e48fff12b12b1d04a0b013ba71e20add
Subproject commit df51b90892737ebe9feca3dd982bcdfc7f684834