From e07d290338a51b4e79ca88c591cb51cc77f0e440 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 11 Dec 2022 15:31:40 -1000 Subject: [PATCH] ;dev: tools: cleanup --- tools/ciwatch | 10 ++-------- tools/push | 4 ++-- tools/pushdocs | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/tools/ciwatch b/tools/ciwatch index 5d51ea0e9..d8a1c2d02 100755 --- a/tools/ciwatch +++ b/tools/ciwatch @@ -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 diff --git a/tools/push b/tools/push index 0b4277dc9..fd7b16276 100755 --- a/tools/push +++ b/tools/push @@ -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() { diff --git a/tools/pushdocs b/tools/pushdocs index fc6b75c4d..5296ad24f 100755 --- a/tools/pushdocs +++ b/tools/pushdocs @@ -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