Skip to content

Commit 227f2b7

Browse files
committed
ci(bump): fix wait
1 parent 53eaa9a commit 227f2b7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

latex/bump-apt-versions.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
set -euo pipefail
44
IFS=$'\n\t'
55

6-
cd "$(\dirname "$0")"
6+
cd "$(\dirname "${0}")"
77

88
if [ -f /.dockerenv ]; then
99

1010
\apt-get update
1111

12+
\rm -f .bump.csv.bak
1213
\sed -e :a -e '/\\$/N; s/\\\n//; ta' Dockerfile | \grep -o -e 'apt-get[^\&\;]*install[^\&\;]*' | \grep -o -e '[^ ]*\=[^ ]*' | while IFS= read -r l; do
1314
p="${l%=*}"
1415
v1="${l#*=}"

latex/create-bump-prs.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ if [ -f .bump.csv.bak ]; then
99
>&2 echo "error: git repo contains uncommitted changes"
1010
exit 1
1111
fi
12+
\git pull
1213
csv="$(\cat .bump.csv.bak)"
1314
\rm -f .bump.csv.bak
1415
while IFS=',' read -r p v1 v2 l1 l2; do
@@ -17,10 +18,12 @@ if [ -f .bump.csv.bak ]; then
1718
\perl -i -p -e "s|\Q${l1}\E|${l2}|g" Dockerfile
1819
\git add Dockerfile
1920
\git commit -S -m "build(deps): bump ${p} from ${v1} to ${v2}"
20-
echo "Please review and push commit in branch \"${b}\". Waiting..."
21-
while [ "$(git rev-list --count --left-only '@{u}...HEAD')" -gt 0 ]; do
21+
echo -n "Please review and push commit in branch \"${b}\". Waiting..."
22+
while [ "$(git rev-list --count --right-only 'origin...HEAD')" -gt 0 ]; do
2223
\sleep 1
24+
\echo -n .
2325
done
26+
\echo
2427
\gh pr create -f -l build -l dependencies
2528
\git checkout -
2629
done <<<"${csv}"

0 commit comments

Comments
 (0)