Skip to content

Commit 306df2e

Browse files
committed
chore: clean up release script
1 parent e5f959f commit 306df2e

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

build/releaser.js

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ inquirer
3131
})
3232
})
3333
.then(version => {
34-
console.log(`Releasing v${version}...`)
34+
console.log(blue(`Releasing v${version}...`))
35+
console.log(blue('-'.repeat(80)))
3536

36-
// build
3737
const buildMessage = `build: ${version}`
3838
const releaseMessage = `release: ${version}`
3939
return runCommands(`
@@ -56,31 +56,23 @@ inquirer
5656
`)
5757
})
5858
.then(() => {
59+
console.log(blue('-'.repeat(80)))
5960
console.log(blue('Release complete.'))
6061
})
6162
.catch(err => {
63+
console.log(blue('-'.repeat(80)))
64+
console.log(err)
65+
console.log(blue('-'.repeat(80)))
6266
console.log(blue('Release has been canceled.'))
6367
})
6468

6569
function runCommands(commands) {
66-
const promises = commands.split('\n')
70+
return commands.split('\n')
6771
.map(c => c.trim())
6872
.filter(c => c.length)
69-
.map((command) => {
70-
return runCommand(command.trim())
71-
})
72-
73-
return new Promise(async (resolve, reject) => {
74-
try {
75-
const res = []
76-
for (let promise of promises) {
77-
res.push(await promise)
78-
}
79-
resolve(res)
80-
} catch (err) {
81-
reject(err)
82-
}
83-
})
73+
.reduce((promise, command) => {
74+
return promise.then(() => runCommand(command))
75+
}, Promise.resolve())
8476
}
8577

8678
function runCommand(command) {

packages/nativescript-vue-template-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-vue-template-compiler",
3-
"version": "0.5.0",
3+
"version": "0.4.1",
44
"description": "template compiler for nativescript-vue",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)