Skip to content

Commit

Permalink
Merge pull request #3 from PAYONE-GmbH/release/v0.0.1
Browse files Browse the repository at this point in the history
Release/v0.0.1
  • Loading branch information
ehrdi authored Aug 7, 2024
2 parents c3646d9 + 35464bb commit 2da1bbe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions prepare_release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

VERSION=$1

# Check if an argument is provided
Expand Down Expand Up @@ -43,11 +45,14 @@ fi
sed -i '' -e "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json

# Update the version number in the package-lock.json file
sed -i '' -e "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package-lock.json
jq --arg version "$VERSION" '
.version = $version |
.packages[""].version = $version
' package-lock.json >tmp.json && mv tmp.json package-lock.json

# Commit the changes
git add package.json package-lock.json
git commit -m "Update version to $VERSION"
git commit -m "chore: update version to $VERSION"
git tag -a $TAG -m "Release version $VERSION"

echo "Version updated to $VERSION and tagged in Git."
Expand Down

0 comments on commit 2da1bbe

Please sign in to comment.