Skip to content

Commit

Permalink
feat(ci): add version bump script
Browse files Browse the repository at this point in the history
  • Loading branch information
hiteshnayak305 committed Nov 29, 2024
1 parent 62fedc1 commit 220b7c8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: Build and Release
on:
push:
tags:
- "v*"
- "*"

permissions:
contents: write
pull-requests: read

jobs:
release:
Expand Down
18 changes: 18 additions & 0 deletions ci/bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
if [ $# -lt 2 ]; then
echo "not enough arguments"
exit 1
elif [ $# -gt 2 ]; then
echo "too many arguments"
exit 1
fi

echo "bump version from $1 to $2"

# change version in galaxy.yml
sed -i "s/sonar.projectVersion=$1/sonar.projectVersion=$2/1" sonar-project.properties

# push new version to scm
git add .
git commit -m "chore(dev): bump version to $2"
git tag $2

0 comments on commit 220b7c8

Please sign in to comment.