ci/release: Fixes
This commit is contained in:
parent
d866f3fff8
commit
0c56cf8167
3 changed files with 15 additions and 7 deletions
|
|
@ -325,7 +325,7 @@ is_prefix_writable() {
|
|||
# /usr/local owned by root but you don't need root to write to its subdirectories which
|
||||
# is all we want to do.
|
||||
if [ ! -w "$PREFIX/bin" ]; then
|
||||
return 0
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -170,8 +170,9 @@ OS=$OS \
|
|||
ARCH=$ARCH \
|
||||
ARCHIVE=$ARCHIVE \
|
||||
TERM=$TERM \
|
||||
PATH=\"/usr/local/bin:/usr/local/sbin\${PATH+:\$PATH}\" \
|
||||
PATH=\"/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin\${PATH+:\$PATH}\" \
|
||||
./src/d2/ci/release/_build.sh"
|
||||
sh_c mkdir -p $HW_BUILD_DIR
|
||||
sh_c rsync --archive --human-readable "$RHOST:src/d2/$ARCHIVE" "$ARCHIVE"
|
||||
}
|
||||
|
||||
|
|
@ -186,6 +187,7 @@ ARCH=$ARCH \
|
|||
ARCHIVE=$ARCHIVE \
|
||||
TERM=$TERM \
|
||||
./src/d2/ci/release/build_docker.sh"
|
||||
sh_c mkdir -p $HW_BUILD_DIR
|
||||
sh_c rsync --archive --human-readable "$RHOST:src/d2/$ARCHIVE" "$ARCHIVE"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ cd -- "$(dirname "$0")/../../.."
|
|||
|
||||
help() {
|
||||
cat <<EOF
|
||||
usage: $0 [--dry-run]
|
||||
usage: $0 [--dry-run] [--skip-create]
|
||||
|
||||
$0 creates and ensures the d2 builders in AWS.
|
||||
EOF
|
||||
|
|
@ -23,6 +23,10 @@ main() {
|
|||
flag_noarg && shift "$FLAGSHIFT"
|
||||
DRY_RUN=1
|
||||
;;
|
||||
skip-create)
|
||||
flag_noarg && shift "$FLAGSHIFT"
|
||||
SKIP_CREATE=1
|
||||
;;
|
||||
'')
|
||||
shift "$FLAGSHIFT"
|
||||
break
|
||||
|
|
@ -36,7 +40,9 @@ main() {
|
|||
flag_errusage "no arguments are accepted"
|
||||
fi
|
||||
|
||||
if [ -z "${SKIP_CREATE-}" ]; then
|
||||
create_rhosts
|
||||
fi
|
||||
init_rhosts
|
||||
}
|
||||
|
||||
|
|
@ -228,9 +234,9 @@ init_rhost_macos() {
|
|||
sleep 5
|
||||
done
|
||||
sh_c ssh "$RHOST" '": | /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""'
|
||||
sh_c ssh "$RHOST" '/usr/local/bin/brew update'
|
||||
sh_c ssh "$RHOST" '/usr/local/bin/brew upgrade'
|
||||
sh_c ssh "$RHOST" '/usr/local/bin/brew install go'
|
||||
sh_c ssh "$RHOST" 'PATH="/usr/local/bin:/opt/homebrew/bin:\$PATH" brew update'
|
||||
sh_c ssh "$RHOST" 'PATH="/usr/local/bin:/opt/homebrew/bin:\$PATH" brew upgrade'
|
||||
sh_c ssh "$RHOST" 'PATH="/usr/local/bin:/opt/homebrew/bin:\$PATH" brew install go'
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
|
|
|||
Loading…
Reference in a new issue