pub / stagit-scripts

Building src.jayvii.de with stagit
git clone https://src.jayvii.de/pub/stagit-scripts.git
Home | Log | Files | Exports | Refs | README | RSS

commit c2ccedb3104e1fc9ff1d32509fab49b12c9aeb07
parent 6503f25b8b1c482809edd251cbf2a1dbe1b5fcfe
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Mon, 17 Jun 2024 19:58:36 +0200

fix: unify post-push hook arguments into single argument

Diffstat:
Mbin/git_deploy.sh | 9++-------
Mbin/git_export_tarball.sh | 9++-------
Mbin/git_post_push.sh | 6+++---
3 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/bin/git_deploy.sh b/bin/git_deploy.sh @@ -14,21 +14,16 @@ git_deploy.sh \\ \"/var/www/git.example.git\" \\ \"pub\" \\ \"stagit-jayvii.de\" \\ - \$@ # optional parameters given by post-update hook + \"refs/tags/v0.0.0\" # optional parameters given by post-update hook " exit 1; fi -for REF in $@; do +for REF in ${4}; do # Git-Repository cd "${1}/${2}/${3}.git" - # skip first three parameters - if [ "$REF" = "$1" ] || [ "$REF" = "$2" ] || [ "$REF" = "$3" ]; then - continue - fi - # fetch newest tag from given ref TAG=`git tag --contains $REF | tail -n 1 | awk '{ print $NF }'` diff --git a/bin/git_export_tarball.sh b/bin/git_export_tarball.sh @@ -14,7 +14,7 @@ git_export_tarball.sh \\ \"/var/www/git.example.git\" \\ \"pub\" \\ \"stagit-jayvii.de\" \\ - \$@ # optional parameters given by post-update hook + \"refs/tags/v0.0.0\" # optional parameters given by post-update hook " exit 1; fi @@ -27,12 +27,7 @@ if [ -f "${1}/url" ]; then URL=`cat ${1}/url` fi -for REF in $@; do - - # skip first three parameters - if [ "$REF" = "$1" ] || [ "$REF" = "$2" ] || [ "$REF" = "$3" ]; then - continue - fi +for REF in ${4}; do # fetch branches and tags from given ref BRANCHES=" diff --git a/bin/git_post_push.sh b/bin/git_post_push.sh @@ -14,14 +14,14 @@ git_post_push.sh \\ \"/var/www/git.example.git\" \\ \"pub\" \\ \"stagit-jayvii.de\" \\ - \$@ + \$@ # optional paramaters given by post-push hook " exit 1; fi ~/bin/git_update_repo.sh "${1}" "${2}" "${3}" -~/bin/git_export_tarball.sh "${1}" "${2}" "${3}" $@ -~/bin/git_deploy.sh "${1}" "${2}" "${3}" $@ +~/bin/git_export_tarball.sh "${1}" "${2}" "${3}" "$@" +~/bin/git_deploy.sh "${1}" "${2}" "${3}" "$@" ~/bin/git_update_repo_html.sh "${1}" "${2}" "${3}" ~/bin/git_update_index_html.sh "${1}" "${2}"