File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 7979 if [ "$VERSION_BUMP" = "manual" ]; then
8080 STABLE_VERSION="$STABLE_VERSION_INPUT"
8181 else
82- STABLE_VERSION="$(
83- CURRENT_LATEST="$CURRENT_LATEST" VERSION_BUMP="$VERSION_BUMP" node - <<'NODE'
84- const currentLatest = process.env.CURRENT_LATEST || '';
85- const bump = process.env.VERSION_BUMP || 'patch';
82+ STABLE_VERSION="$(CURRENT_LATEST="$CURRENT_LATEST" VERSION_BUMP="$VERSION_BUMP" node -e '
83+ const currentLatest = process.env.CURRENT_LATEST || "";
84+ const bump = process.env.VERSION_BUMP || "patch";
8685 const match = currentLatest.match(/^(\d+)\.(\d+)\.(\d+)(?:-.+)?$/);
8786 let major = match ? Number(match[1]) : 0;
8887 let minor = match ? Number(match[2]) : 0;
@@ -94,20 +93,19 @@ jobs:
9493 patch = 1;
9594 } else if (isPrerelease) {
9695 // Promote the current prerelease base to stable, for example 0.0.1-next.18 -> 0.0.1.
97- } else if (bump === ' major' ) {
96+ } else if (bump === " major" ) {
9897 major += 1;
9998 minor = 0;
10099 patch = 0;
101- } else if (bump === ' minor' ) {
100+ } else if (bump === " minor" ) {
102101 minor += 1;
103102 patch = 0;
104103 } else {
105104 patch += 1;
106105 }
107106
108107 process.stdout.write(`${major}.${minor}.${patch}`);
109- NODE
110- )"
108+ ')"
111109 fi
112110
113111 if ! printf '%s' "$STABLE_VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$'; then
You can’t perform that action at this time.
0 commit comments