Skip to content

Commit

Permalink
PMM-4817 use ssh vs https in create-tags script (#2420)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Tymchuk authored Aug 17, 2023
1 parent 40c13ff commit e1b2f65
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build/scripts/create-tags
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,26 @@ if ! git clone --branch "pmm-${VERSION}" --single-branch https://github.com/Perc
fi

cd "$REPO_DIR" >/dev/null
git submodule update
git submodule update --init

for REPO in "${repos[@]}"; do
pushd "$REPO" >/dev/null
# git remote set-url origin git@github.com:${REPO}.git
echo "SHA: $(git rev-parse HEAD)"
REPO_URL=$(git config --get remote.origin.url | sed -e "s|^https://github.com/||")
git remote set-url origin [email protected]:${REPO_URL}.git

if git tag -l | grep "$TAG"; then
echo "Fatal: tag $TAG already exists in $REPO, exiting..."
break
fi

echo "Tagging SHA: $(git rev-parse HEAD)"
if [ -n "$CI" ]; then
# We can't sign tags in CI, so we create them without signing
git tag --message="Version $VERSION." "$TAG"
else
git tag --message="Version $VERSION." --sign "$TAG"
fi

if ! git push origin "$TAG"; then
echo "Fatal: failed to tag the repository $REPO with $TAG, exiting..."
popd >/dev/null
Expand Down

0 comments on commit e1b2f65

Please sign in to comment.