-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3252 from cytoscape/fix/auto-rel-instr
Simplify release instructions
- Loading branch information
Showing
12 changed files
with
128 additions
and
101 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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
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
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 |
---|---|---|
@@ -1,33 +1,38 @@ | ||
#!/bin/bash | ||
|
||
# Get the current version from package.json | ||
PREV_VERSION=$(jq -r '.version' package.json) | ||
echo "Prev Patch Version $PREV_VERSION" | ||
|
||
# Split the version number into major, minor, and patch components | ||
IFS='.' read -a VERSION_ARRAY <<< "$PREV_VERSION" | ||
echo "SPLITTING COMPLETED" | ||
|
||
major=${VERSION_ARRAY[0]} | ||
minor=${VERSION_ARRAY[1]} | ||
patch=${VERSION_ARRAY[2]} | ||
echo "CURRENT PATCH VERSION" $patch | ||
major="${VERSION_ARRAY[0]}" | ||
minor="${VERSION_ARRAY[1]}" | ||
patch="${VERSION_ARRAY[2]}" | ||
echo "CURRENT PATCH VERSION $patch" | ||
|
||
# Increment the patch version | ||
patch=$((patch + 1)) | ||
echo "UPDATED PATCH VERSION" $patch | ||
echo "UPDATED PATCH VERSION $patch" | ||
|
||
# Form the new version string | ||
VERSION="$major.$minor.$patch" | ||
|
||
# Split the version number into major, minor, and patch components | ||
# Split the new version number into major, minor, and patch components to validate | ||
IFS='.' read -a VERSION_ARRAY_2 <<< "$VERSION" | ||
if [[ ${#VERSION_ARRAY_2[@]} -lt 3 ]]; then | ||
echo "Error: Invalid new version format" | ||
exit 1 | ||
fi | ||
|
||
if [ $BRANCH != "refs/heads/master" ]; then | ||
# Set the branch name if it's not the master branch | ||
if [ "$BRANCH" != "refs/heads/master" ]; then | ||
BRANCH="${VERSION_ARRAY[0]}.${VERSION_ARRAY[1]}.x" | ||
fi | ||
|
||
echo "Version $VERSION" | ||
|
||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
# Export the new version to the GitHub Actions environment | ||
echo "VERSION=$VERSION" >> "$GITHUB_ENV" |
Oops, something went wrong.