Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Oct 16, 2021
1 parent a9613ec commit 484605d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ git remote set-url origin "https://$TOKEN@github.com/$GITHUB_REPOSITORY"
git fetch origin +refs/tags/*:refs/tags/*

FILES=$2
CURRENT_TAG=${3:-$(git describe --abbrev=0 --tags "$(git rev-list --tags --skip=1 --max-count=1)" || true)}
TAG=$(git describe --abbrev=0 --tags "$(git rev-list --tags --skip=1 --max-count=1 2>&1)" 2>&1) && exit_status=$? || exit_status=$?
NEW_TAG=${4:-"${GITHUB_REF/refs\/tags\//}"}
PATTERN=$5

if [[ -z $CURRENT_TAG ]]; then
if [[ $exit_status -ne 0 ]]; then
echo "::warning::Initial release detected no updates would be made to specified files."
echo "::warning::Setting new_version and old_version to $NEW_TAG."
echo "::set-output name=is_initial_release::true"
Expand All @@ -29,6 +29,8 @@ else
echo "::set-output name=is_initial_release::false"
fi

CURRENT_TAG=${3:-"$TAG"}

for path in ${FILES}
do
echo "Replacing $CURRENT_TAG with $NEW_TAG for: $path"
Expand Down

0 comments on commit 484605d

Please sign in to comment.