Tidying + bug fix

Add some comments
Adjust spacing
Adjust messages filename
Don't hang if unrecognised switch used
Update VersionNum and VerionASM from master
2 jobs for !1 with CObey in 5 seconds (queued for 46 seconds)
latest detached
Status Job ID Name Coverage
  Static Analysis
failed #5707
cross allowed to fail
merge_log

00:00:02

passed #5708
cross
merge_whitesp

00:00:02

 
Name Stage Failure
failed
merge_log Static Analysis
Executing "step_script" stage of the job script
$ git remote show | grep target > /dev/null && git remote remove target || true; git remote add -t $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -f target $CI_MERGE_REQUEST_PROJECT_URL.git; has_versionnum=1; custom_versionnum=0; if test -f VersionNum; then grep -q "This file is automatically maintained by srccommit, do not edit manually." VersionNum || custom_versionnum=1; else has_versionnum=0; fi; h=$(git rev-parse HEAD); for r in $(git rev-list --reverse $(git merge-base HEAD target/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME)..HEAD); do git log -1 --pretty=format:%B $r | awk ' BEGIN { keywords=0; nochange=0; notag=0; tag=""; printf("\033[91m") } /!NoChange|!NoTag|!Tag\([^)]+\)/ { ++keywords } /!NoChange/ { if ("'$r'"=="'$h'") nochange=1; else { print "Commit '$r' is not tip of merge request and uses !NoChange keyword in log"; result=1 } } /!NoTag/ { if ("'$r'"=="'$h'") notag=1; else { print "Commit '$r' is not tip of merge request and uses !NoTag keyword in log"; result=1 } } /!Tag\([^)]+\)/ { if ("'$r'"=="'$h'") tag=gensub(/^.*!Tag\(([^)]+)\).*$/, "\\1", "g"); else { print "Commit '$r' is not tip of merge request and uses !Tag keyword in log"; result=1 } } NR==1 && length($0)>70 { print "Commit '$r' log summary line exceeds 70 characters"; result=1 } NR==2 && length($0)>0 { print "Commit '$r' log requires a single-line summary followed by a blank line"; result=1 } NR>=2 && length($0)>80 { print "Commit '$r' log line "NR" exceeds 80 characters"; result=1 } END { if (keywords > 1) { print "Commit '$r' uses multiple keywords in log"; result = 1 } if ("'$r'"=="'$h'") { if (!'$has_versionnum' && tag=="") { print "Either create a VersionNum file or use !Tag keyword in log"; result=1 } if ('$custom_versionnum' && tag=="" && notag==0) { print "Non-standard VersionNum file requires either !Tag or !NoTag keyword in log"; result=1 } if (tag!="") { if ('$has_versionnum' && !'$custom_versionnum') { print "!Tag keyword must not be used with standard VersionNum file"; result=1 } if (system("git check-ref-format \"tags/" tag "\"")) { print "Invalid tag name"; result = 1 } else if (!system("git ls-remote --exit-code --tags target " tag " > /dev/null")) { print "Tag already exists in destination repository"; result=1 } } printf("\033[39m") } exit result; }'; done
Updating target
From https://gitlab.riscosopen.org/RiscOS/Sources/Programmer/Obey
* [new branch] master -> target/master
* [new tag] Obey-0_41 -> Obey-0_41
Commit 49359836b06f1b84d69743ce122787b6bd5c0c29 log requires a single-line summary followed by a blank line
Cleaning up file based variables
ERROR: Job failed: exit status 1