Skip to content

Commit

Permalink
CI | Support forward slashes in branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng committed Nov 15, 2024
1 parent 8b3d6ea commit 4fee1c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions deploy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ fi
# Main
G_EXEC cd /tmp
G_EXEC curl -sSfLO "https://github.com/$OWNER/DietPi-Website/archive/$BRANCH.tar.gz"
G_EXEC tar xf "$BRANCH.tar.gz"
G_EXEC rm "$BRANCH.tar.gz"
# - Support forward slashes in branch name
G_EXEC tar xf "${BRANCH##*/}.tar.gz"
G_EXEC rm "${BRANCH##*/}.tar.gz"
# - GitHub replaces forward slashes with dashes for dir names
BRANCH=${BRANCH//\//-}
G_EXEC cd "DietPi-Website-$BRANCH"
# Cleanup
[[ $GITHUB_ACTIONS ]] || G_EXEC rm -R README.md LICENSE deploy.bash .??*
Expand Down

0 comments on commit 4fee1c0

Please # to comment.