Skip to content

Commit 0bfbf0d

Browse files
committed
build: fix release tagging
1 parent ea0c413 commit 0bfbf0d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

build/releaser.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ inquirer
2222
name: 'releaseTag',
2323
type: 'input',
2424
message: 'Input release tag',
25+
default: 'next',
2526
when: ({bump}) => bump === 'custom'
2627
}
2728
])
@@ -37,8 +38,8 @@ inquirer
3738
type: 'confirm',
3839
message: 'Are you sure you want to release v' + v.version + (res.releaseTag ? ' with tag: ' + res.releaseTag: ''),
3940
default: false
40-
}]).then((res) => {
41-
if (res.confirmed) {
41+
}]).then(({confirmed}) => {
42+
if (confirmed) {
4243
return resolve({
4344
version: v.version,
4445
releaseTag: res.releaseTag
@@ -50,6 +51,7 @@ inquirer
5051
})
5152
.then(({version, releaseTag}) => {
5253
console.log(blue(`Releasing v${version}...`))
54+
console.log(blue(`With tag: ${releaseTag}`))
5355
console.log(blue('-'.repeat(80)))
5456

5557
const buildMessage = `build: ${version}`
@@ -60,7 +62,7 @@ inquirer
6062
echo "Starting build..."
6163
VERSION=${version} npm run build
6264
echo "Build Successful. Updating packages"
63-
cd packages/nativescript-vue-template-compiler && npm version ${version} && npm publish
65+
cd packages/nativescript-vue-template-compiler && npm version ${version} && npm publish${releaseTag ? ' --tag ' + releaseTag : ''}
6466
git add -A
6567
git add -f dist/index.js dist/index.js.map packages/nativescript-vue-template-compiler/index.js
6668
git commit --no-verify -m "${buildMessage}"

0 commit comments

Comments
 (0)