Skip to content

Commit 0959c5c

Browse files
committed
fix: standard-version
1 parent d5d6697 commit 0959c5c

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

.github/version.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
11
#!/bin/bash
22

33
# sh ./version.sh bump => bumping version with standardVersion and will use patch as relaseVersion
4-
# sh ./version.sh bump major => bumping version with standardVersion and will use major as relaseVersion
54

65
VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[ ",]//g')
76
PACKAGE_NAME=$(cat package.json | grep name | head -1 | awk -F: '{ print $2 }' | sed 's/[ ",]//g')
87

98
PREVIOUS_VERSION=$(npm view $PACKAGE_NAME version)
109

1110
BUMP=$1
12-
PRE_RELEASE=$2
13-
14-
if [ -z "$PRE_RELEASE" ]; then
15-
PRE_RELEASE="patch"
16-
fi
17-
1811
if [ -z "$BUMP" ]; then
1912
echo 'No BUMP found'
2013
exit 0
2114
fi
2215

2316
if [ "$VERSION" == "$PREVIOUS_VERSION" ]; then
24-
yarn run release:$PRE_RELEASE
17+
yarn run release
2518
VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[ ",]//g')
2619

27-
echo "Release version: $VERSION, previous version: $PREVIOUS_VERSION with preRelease $PRE_RELEASE"
20+
echo "Release version: $VERSION, previous version: $PREVIOUS_VERSION"
2821
else
29-
yarn run release
22+
yarn run release --skip.bump,changelog
3023
fi
3124

3225
echo "VERSION=$VERSION" >>$GITHUB_ENV

.github/workflows/buildPublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
run: |
6767
git config user.name "GitHub Actions Bot"
6868
git config user.email "<>"
69-
bash $GITHUB_WORKSPACE/.github/version.sh bump patch
69+
bash $GITHUB_WORKSPACE/.github/version.sh bump
7070
7171
- name: Creating .env file
7272
uses: iamsauravsharma/[email protected]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"typecheck:watch": "yarn run typecheck -- --watch",
1313
"lint": "tsc --noEmit && eslint '*/**/*.{js,ts,tsx}' --quiet --fix",
1414
"test": "echo 'No test'",
15-
"release": "standard-version --skip.bump,changelog",
15+
"release": "standard-version",
1616
"release:patch": "standard-version --release-as patch",
1717
"release:minor": "standard-version --release-as minor",
1818
"release:major": "standard-version --release-as major"

0 commit comments

Comments
 (0)