Skip to content

Commit

Permalink
PMM-4817 update the description
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Tymchuk committed Jul 21, 2023
1 parent 33e8361 commit 1f13d02
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions build/scripts/create-tags
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Important: This script should never cause the pipeline to fail, so that the tags can be created outside of it.
# To run it locally, you need pass the version, i.e. export VERSION=2.39.x
# If run locally, it:
# - it clones the pmm-submodules repo and checks out the branch corresponding to the version
# - does not need to configure git to push using ssh, this user should set it all up ahead of time
# - will use the user's creds and email to tag the repos, therefore sufficient permissions are required
# - clones pmm-submodules repository and checks out the branch corresponding to the version
# - skips git ssh configuration and expects the user to set it up ahead of time
# - uses the current user's creds and email to push tags to the repos, therefore sufficient git permissions are required

set +o errexit
set +o nounset
Expand Down Expand Up @@ -37,7 +37,7 @@ if [ -d "$REPO_DIR" ]; then
rm -rf "$REPO_DIR"
fi

if ! git clone --branch "pmm-${VERSION}" https://github.com/Percona-Lab/pmm-submodules "$REPO_DIR"; then
if ! git clone --branch "pmm-${VERSION}" --single-branch https://github.com/Percona-Lab/pmm-submodules "$REPO_DIR"; then
echo "Fatal: failed to clone pmm-submodules, branch pmm-${VERSION}"
exit 0 # this is on purpose, we don't want to fail the pipeline
fi
Expand All @@ -46,20 +46,19 @@ cd "$REPO_DIR" >/dev/null
git submodule update --init --recursive

for REPO in "${repos[@]}"; do

pushd "$REPO" >/dev/null
# git remote set-url origin [email protected]:${REPO}.git
echo "SHA: $(git rev-parse HEAD)"

# If the tag already exists, we want to delete it and re-tag this SHA
if git tag -l "$TAG"; then
echo "Fatal: tag $TAG already exists in $REPO, we won't continue..."
echo "Fatal: tag $TAG already exists in $REPO, exiting..."
break
fi

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

0 comments on commit 1f13d02

Please sign in to comment.