diff options
Diffstat (limited to 'aux/workflow')
-rwxr-xr-x | aux/workflow/TODOs.sh | 7 | ||||
-rwxr-xr-x | aux/workflow/assert-changelog.sh | 3 | ||||
-rwxr-xr-x | aux/workflow/assert-readme.sh | 7 | ||||
-rwxr-xr-x | aux/workflow/commonmark.sh | 7 | ||||
-rwxr-xr-x | aux/workflow/public.sh | 13 |
5 files changed, 17 insertions, 20 deletions
diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh index 9f9f657..f93ece8 100755 --- a/aux/workflow/TODOs.sh +++ b/aux/workflow/TODOs.sh @@ -1,14 +1,13 @@ #!/bin/sh set -eu -mkdir -p public - PROJECT_UC="$1" PROJECT="$2" MAILING_LIST="$3" +OUTDIR="$4" TLD="$(cat aux/tld.txt)" -TODOS_ADD_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## <a href="#\3"><span class="\1">\1<\/span> \2<\/a>\n<span class="header-anchor" id="\3">#\3<\/span>\n/' +TODOS_ADD_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## <a href="#\3"><span class="\1">\1<\/span> \2<\/a>\n<pre class="header-anchor" id="\3">#\3<\/pre>\n/' TODOS_CLEANUP_REGEX1='s/(<a><a)/<a/' TODOS_CLEANUP_REGEX2='s/<\/a><\/a>/<\/a>/' @@ -37,4 +36,4 @@ sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \ | \ perl -pe "$TODOS_CLEANUP_REGEX1" | \ perl -pe "$TODOS_CLEANUP_REGEX2" \ - > public/TODOs.html + > "$OUTDIR/TODOs.html" diff --git a/aux/workflow/assert-changelog.sh b/aux/workflow/assert-changelog.sh index 61cd916..e2cd926 100755 --- a/aux/workflow/assert-changelog.sh +++ b/aux/workflow/assert-changelog.sh @@ -33,8 +33,7 @@ for VVERSION in $(git tag); do done # "$@" represents a list of tags to be also included in the verification. -# shellcheck disable=2068 -for VVERSION in $@; do +for VVERSION in "$@"; do DATE="$(date '+%Y-%m-%d')" assert "$DATE" "$VVERSION" done diff --git a/aux/workflow/assert-readme.sh b/aux/workflow/assert-readme.sh index 2e5d978..2a6c3fd 100755 --- a/aux/workflow/assert-readme.sh +++ b/aux/workflow/assert-readme.sh @@ -1,8 +1,6 @@ #!/bin/sh set -eu -mkdir -p public - PROJECT="$1" MAILING_LIST="$2" shift @@ -43,7 +41,7 @@ RELEASES_LIST="$(mktemp)" add_release() { DATE="$1" VVERSION="$2" - echo "- version [$VVERSION](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$VVERSION.tar.gz) ([sig](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$VVERSION.tar.gz.asc)), released in $DATE" >> "$RELEASES_LIST" + echo "- [$VVERSION](https://git.euandreh.xyz/$PROJECT/commit/?id=$VVERSION) [$PROJECT-$VVERSION.tar.gz](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$VVERSION.tar.gz) ([sig](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$VVERSION.tar.gz.asc)), released in $DATE" >> "$RELEASES_LIST" } for VVERSION in $(git tag); do @@ -52,8 +50,7 @@ for VVERSION in $(git tag); do done # "$@" represents a list of tags to be also included in the verification. -# shellcheck disable=2068 -for VVERSION in $@; do +for VVERSION in "$@"; do if ! git tag | grep -qF "$VVERSION"; then DATE="$(date '+%Y-%m-%d')" add_release "$DATE" "$VVERSION" diff --git a/aux/workflow/commonmark.sh b/aux/workflow/commonmark.sh index 6016f51..7267145 100755 --- a/aux/workflow/commonmark.sh +++ b/aux/workflow/commonmark.sh @@ -1,11 +1,10 @@ #!/bin/sh set -eu -mkdir -p public - PROJECT_UC="$1" F="$2" -OUT="${3:-${F%.*}.html}" +OUTDIR="$3" +OUT="${4:-${F%.*}.html}" pandoc \ --toc \ @@ -17,4 +16,4 @@ pandoc \ -r commonmark \ -w html \ -H aux/workflow/favicon.html \ - < "$F" > "public/$OUT" + < "$F" > "$OUTDIR/$OUT" diff --git a/aux/workflow/public.sh b/aux/workflow/public.sh index 8ecb855..7433595 100755 --- a/aux/workflow/public.sh +++ b/aux/workflow/public.sh @@ -4,14 +4,17 @@ set -eu PROJECT_UC="$1" PROJECT="$2" MAILING_LIST="$3" +OUTDIR="$4" -sh aux/workflow/TODOs.sh "$PROJECT_UC" "$PROJECT" "$MAILING_LIST" -sh aux/workflow/commonmark.sh "$PROJECT" README.md index.html ||: +mkdir -p "$OUTDIR" + +sh aux/workflow/TODOs.sh "$PROJECT_UC" "$PROJECT" "$MAILING_LIST" "$OUTDIR" +sh aux/workflow/commonmark.sh "$PROJECT" README.md "$OUTDIR" index.html ||: if [ -f CHANGELOG.md ]; then - sh aux/workflow/commonmark.sh "$PROJECT" CHANGELOG.md + sh aux/workflow/commonmark.sh "$PROJECT" CHANGELOG.md "$OUTDIR" fi -sh aux/ci/report.sh "$PROJECT" +sh aux/ci/report.sh "$PROJECT" "$OUTDIR" -cp aux/workflow/favicon.* public/ +cp aux/workflow/favicon.svg aux/workflow/favicon.png "$OUTDIR" |