Skip to content

Commit

Permalink
build the tarball name for GITHUB_REF
Browse files Browse the repository at this point in the history
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Nov 29, 2023
1 parent e3c7155 commit be0063d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/job-0-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ set -x
# environment variables
test -f $HOME/.ciprofile && . $HOME/.ciprofile

branch=$(git branch --show-current)

echo "Got GIT branch name $branch"

# convert "refs/remotes/pull/XYZ/merge" into "PR-XYZ"
branch=$(echo $branch | sed -r -e 's@refs/remotes/pull/([0-9]+)/mergepr/@PR-\1@')
# GITHUB_REF contains refs/heads/<branch_name>, refs/pull/<pr_number>/merge, or refs/tags/<tag_name>
# convert into the branch/tag name or into "PR-XYZ"
branch=$(echo $GITHUB_REF | sed -r -e 's@refs/([^/]+)/@@' | sed -r -e 's@([0-9]+)/merge@PR-\1@')

# keep branch-name before the first '-' (e.g. v2.0-beta becomes v2.0)
# and look for the corresponding autotools.
Expand Down

0 comments on commit be0063d

Please sign in to comment.