slfan1989 commented on code in PR #2445:
URL: https://github.com/apache/auron/pull/2445#discussion_r3687259269
##########
auron-build.sh:
##########
@@ -529,6 +529,8 @@ mkdir -p "$(dirname "$BUILD_INFO_FILE")"
JAVA_VERSION=$(java -version 2>&1 | head -n 1 | awk '{print $3}' | tr -d '"')
PROJECT_VERSION=$(./build/mvn help:evaluate -N -Dexpression=project.version
-Pspark-${SPARK_VER} -q -DforceStdout 2>/dev/null)
RUST_VERSION=$(rustc --version | awk '{print $2}')
+BUILD_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
Review Comment:
Thanks for the contribution! In the release workflows, `actions/checkout`
checks out `${{ github.event.pull_request.head.sha }}`, which leaves the
repository in detached HEAD state. In that case, `git rev-parse --abbrev-ref
HEAD` records `HEAD` rather than the actual source branch, so the branch
metadata will not be useful for CI-built artifacts. Could we support an
explicit build-branch environment variable, populated from
`github.head_ref/github.ref_name`, and fall back to Git only for local builds?
Please also make sure the value is forwarded into Docker builds.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]