This is an automated email from the ASF dual-hosted git repository. cbrisson pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/velocity-site.git
commit b9f786f3c09d9cb0c2753b1512cd0fc3708b5a50 Author: Claude Brisson <[email protected]> AuthorDate: Sun Sep 8 00:09:57 2024 +0200 [site builder] Fix command to get current branch --- builder/bin/builder.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/builder/bin/builder.sh b/builder/bin/builder.sh index f069482..fc43d58 100755 --- a/builder/bin/builder.sh +++ b/builder/bin/builder.sh @@ -11,6 +11,7 @@ set -o pipefail # debugging #set -o xtrace + # Determine the real location of the script, past symlinks. # (source: https://stackoverflow.com/a/246128/710286 ) SOURCE="${BASH_SOURCE[0]}" @@ -60,7 +61,7 @@ then exit 1 fi cd velocity-site-prod -BRANCH="$(git status -bs | head -1 | sed -r -e 's,^.*origin/,,')" +BRANCH="$(git rev-parse --abbrev-ref HEAD)" if test "$BRANCH" != "asf-site" then echo velocity-site-prod repository not on the asf-site branch, exiting @@ -86,7 +87,7 @@ if [[ "$(docker images -q $DOCKER_NAME 2> /dev/null)" == "" ]]; then fi # do the voodoo -docker run --rm -ti --name $DOCKER_NAME -u "$(id -u):$(id -g)" --volume="$BASE:/home/velocity" --publish 127.0.0.1:$PORT:8000 $DOCKER_NAME +docker run -it --name $DOCKER_NAME -u "$(id -u):$(id -g)" --volume="$BASE:/home/velocity" --publish 127.0.0.1:$PORT:8000 $DOCKER_NAME # alternatively, if you need to debug the container (as root), comment the previous command and run instead: # docker run -it --name $DOCKER_NAME --volume="$BASE:/home/velocity" --entrypoint=/bin/bash velocity-site-builder
