;dev: tools: cleanup

This commit is contained in:
Simon Michael 2022-12-11 15:31:40 -10:00
parent abab1a23e3
commit e07d290338
3 changed files with 5 additions and 11 deletions

View File

@ -1,15 +1,9 @@
#!/usr/bin/env bash
# ciwatch [INTERVALSECS]
# Watch the latest Github actions run until it completes, returning the exit status.
# ciwatch [INTERVALSECS] - watch the latest Github actions run until it completes, returning the exit status
INTERVAL="${1:-10}"
#LATESTRUN=$(gh run list -L1 --json databaseId -q .[0].databaseId)
cilatestrunning() {
gh run list --json status,databaseId -q '.[] | select(.status | in({"in_progress":0,"queued":0,"requested":0,"waiting":0})).databaseId' | head -1
}
LATESTRUNNING=$(cilatestrunning)
LATESTRUNNING=$(gh run list --json status,databaseId -q '.[] | select(.status | in({"in_progress":0,"queued":0,"requested":0,"waiting":0})).databaseId' | head -1)
if [[ -n $LATESTRUNNING ]]; then
gh run watch -i"$INTERVAL" "$LATESTRUNNING" --exit-status

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# push [INTERVALSECS] - push to CI branch, watch for a successful run, then push to master
# push [INTERVALSECS] - push to github CI branch, watch for a successful run, then push to master
set -e
@ -10,7 +10,7 @@ REMOTECIBRANCH=simon
REMOTEMAINBRANCH=master
NUMRUNS=3
NUMCOMMITS=5
CISTARTDELAY=5 # between ci push and run start
CISTARTDELAY=5 # between ci push and run start
MAINPUSHDELAY=5 # between run end and master push
gitlog() {

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# pushdocs [MSG] - commit manuals with ";doc: MSG" prefix, push to CI, then to master
# pushdocs [MSG] - commit manuals with ";doc: MSG" prefix, then push to CI & master
set -e