Skip to content

Commit a74e88c

Browse files
committed
update rack-gateway aliases
1 parent 1838ce4 commit a74e88c

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

bashrc/development.sh

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,23 @@ alias GFORCE='git add -A && git commit --amend -C HEAD && git push -f'
2222
# checks out the previous branch, and then rebases onto main.
2323
alias grbl='MAIN_BRANCH=$((! [ -f .git/config ] && echo "master") || (grep -q '"'"'branch "master"'"'"' .git/config && echo master || echo main)) && git checkout "$MAIN_BRANCH" && git pull && git checkout - && git rebase "$MAIN_BRANCH"'
2424

25-
# Helper function for git push with CI approvals
25+
# Helper function for git push with rack-gateway deploy approval
2626
_git_push_and_approve() {
2727
local push_flags=""
28-
local approvals=()
28+
local racks="$1"
29+
shift
2930

3031
# Check for -f flag
3132
if [[ "$1" == "-f" ]]; then
3233
push_flags="-f"
3334
shift
3435
fi
3536

36-
# Collect remaining arguments as approvals
37-
approvals=("$@")
38-
39-
# Execute git push and approvals
40-
git push $push_flags && {
41-
for approval in "${approvals[@]}"; do
42-
./scripts/ci/approve "$approval" || return 1
43-
done
44-
}
45-
46-
./scripts/wait_for_ci_build
37+
git push $push_flags && rack-gateway deploy-approval wait --racks "$racks" --approve
4738
}
4839

49-
gpss() { _git_push_and_approve "$@" staging; }
50-
gpsbs() { _git_push_and_approve "$@" build staging; }
51-
gpsa() { _git_push_and_approve "$@" all; }
52-
gpsba() { _git_push_and_approve "$@" build all; }
40+
gpss() { _git_push_and_approve "staging" "$@"; }
41+
gpsp() { _git_push_and_approve "staging,eu,us" "$@"; }
5342

5443
# Gitlab CI (DocSpring)
5544
# -------------------------------------------------

bashrc/github.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@ gpsw() (
4545
echo "No CI actions detected"
4646
)
4747

48-
# Push, open PR, approve staging deploy, and wait for CI build to finish
48+
# Push, open PR, approve staging deploy via rack-gateway
4949
gpsps() (
5050
set -euo pipefail
5151
_git_push_create_pr_and_open_pipeline "$@"
52-
./scripts/ci/approve staging
53-
[ -f scripts/wait_for_ci_build ] && scripts/wait_for_ci_build
52+
rack-gateway deploy-approval wait --rack staging --approve
5453
)
5554

5655
alias gpssp='gpsps'

bashrc/path.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export PATH="${PATH}:/Users/ndbroadbent/code/depot_tools"
5757
# export PKG_CONFIG_PATH="/opt/homebrew/opt/postgresql@9.6/lib/pkgconfig"
5858

5959
# Postgres.app
60-
export PATH="/Applications/Postgres.app/Contents/Versions/15/bin:${PATH}"
60+
export PATH="/Applications/Postgres.app/Contents/Versions/17/bin:${PATH}"
6161

6262
# Homebrew library paths for compilation (fixes mysql2, nokogiri, etc.)
6363
export LDFLAGS="${LDFLAGS} -L/opt/homebrew/opt/zstd/lib"

0 commit comments

Comments
 (0)