This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ded9ca
commit 87e586a
Showing
1 changed file
with
24 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# | ||
# Creates a new git tag for each package that has a new version. | ||
|
||
set -e | ||
|
||
source ci/detect-changed-manifests.sh | ||
|
||
changed_manifests=$(detect_changed_manifests) | ||
|
||
if [ -n "$changed_manifests" ]; then | ||
for manifest_path in $changed_manifests; do | ||
# Read the package name and version from its manifest. | ||
package_name=$(grep '^name\s*=' "$manifest_path" | awk -F'\"' '{print $2}') | ||
new_version=$(grep '^version\s*=' "$manifest_path" | awk -F'\"' '{print $2}') | ||
|
||
# Create a new git tag. | ||
tag_name="${package_name}-v${new_version}" | ||
git tag "$tag_name" | ||
echo "Created tag: $tag_name" | ||
done | ||
else | ||
echo "No versions changed." | ||
fi |