diff --git a/container/bin/build_source b/container/bin/build_source index 2331c94..09cb6b1 100755 --- a/container/bin/build_source +++ b/container/bin/build_source @@ -248,7 +248,7 @@ get_version() ( if [ -z $version ]; then package_version=$(get_upstream_version $source) git_commit_hash=$(git -C /input rev-parse HEAD) - git_branch=$(git -C /input name-rev --name-only --refs="refs/heads/*" HEAD) + git_branch=$(git -C /input name-rev --name-only --refs="refs/heads/*" "$git_commit_hash") git_tags=$(git -C /input tag) # No version has been provided. Check if there is already a gardenlinux0 version.