Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
add tag-releases script
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Aug 13, 2024
1 parent 3ded9ca commit 87e586a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions ci/tag-releases.sh
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

0 comments on commit 87e586a

Please sign in to comment.