-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|