Skip to content

Commit

Permalink
fix the version bump process
Browse files Browse the repository at this point in the history
  • Loading branch information
gpmayorga committed Dec 3, 2024
1 parent ef84157 commit ff77fc7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/ci-scripts/toggle-alpha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ current_version=$(node -p "require('./package.json').version")

# Check if version contains alpha
if [[ "$current_version" == *"-alpha"* ]]; then
# Remove alpha if present
new_version="${current_version%%-alpha*}"
if [[ "$1" != "yes" ]]; then
# Remove alpha if present and "yes" is not passed
new_version="${current_version%%-alpha*}"
else
# Keep the current version if "yes" is passed
new_version="${current_version}"
fi
elif [[ "$1" == "yes" ]]; then
# Add alpha if not present and "yes" was passed
new_version="${current_version}-alpha"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release and Versioning
name: Package version bump
on:
pull_request_review:
types: [submitted]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@centrifuge/sdk",
"version": "0.0.0-alpha.0",
"version": "0.0.0",
"description": "",
"homepage": "https://github.com/centrifuge/sdk/tree/main#readme",
"author": "",
Expand Down

0 comments on commit ff77fc7

Please sign in to comment.