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

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/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 set -e
@ -10,7 +10,7 @@ REMOTECIBRANCH=simon
REMOTEMAINBRANCH=master REMOTEMAINBRANCH=master
NUMRUNS=3 NUMRUNS=3
NUMCOMMITS=5 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 MAINPUSHDELAY=5 # between run end and master push
gitlog() { gitlog() {

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/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 set -e