Skip to content

Commit

Permalink
tools: add a more powerful bump script (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangze-Li authored Feb 24, 2024
1 parent 2ca1036 commit 3e302ba
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions scripts/bump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

LOCAL_BUILD_REPO='/home/ubuntu/project/sealdice-extra/build'
SEALDICE_REMOTE_NAME='origin'

set -ex

PWD_NOW=$(pwd)
cd "$LOCAL_BUILD_REPO"

git fetch --all --prune

git checkout dev
git reset "$SEALDICE_REMOTE_NAME/dev" --hard
./update-submodules.sh || true

# git checkout next
# git reset origin/next --hard
# ./update-submodules.sh || true

cd "${PWD_NOW}"
unset PWD_NOW

set +x

repo='sealdice/sealdice-build'
sleep 10s

runID=$(gh -R "$repo" run list -w 'Auto Build' -b 'dev' \
-s 'in_progress' -L 1 --json databaseId -q '.[0].databaseId')

if [[ -z $runID ]]; then
echo "No build in progress"
else
gh -R sealdice/sealdice-build run watch "$runID"
fi

unset runID
unset repo

0 comments on commit 3e302ba

Please sign in to comment.