Skip to content

Commit 7f5e8b2

Browse files
committed
chore: add dev tag script
1 parent 3af6fa6 commit 7f5e8b2

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

release.config.cjs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,7 @@ const execPlugin = isDev
2626
: [
2727
'@semantic-release/exec',
2828
{
29-
successCmd: `
30-
VERSION=\${nextRelease.version}
31-
IFS='.' read -r major minor patch <<<"$VERSION"
32-
NEXT_MINOR=$((minor + 1))
33-
DEV_TAG="v\${major}.\${NEXT_MINOR}.0-dev.0"
34-
git tag "$DEV_TAG"
35-
git push origin "$DEV_TAG"
36-
`,
29+
successCmd: './scripts/create-dev-tag.sh ${nextRelease.version}',
3730
},
3831
];
3932

scripts/create-dev-tag.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
VERSION="$1"
3+
IFS="." read -r major minor patch <<< "$VERSION"
4+
NEXT_MINOR=$((minor + 1))
5+
DEV_TAG="v${major}.${NEXT_MINOR}.0-dev.0"
6+
echo "[semantic-release] tagging: $DEV_TAG"
7+
git tag "$DEV_TAG"
8+
git push origin "$DEV_TAG"

0 commit comments

Comments
 (0)