ci: refactor desktop app release ci, add nightly build

This commit is contained in:
Andelf
2021-11-25 21:38:31 +08:00
committed by Tienson Qin
parent 5867e7d9ef
commit fa003e6f57
3 changed files with 179 additions and 267 deletions

View File

@@ -0,0 +1,17 @@
// This script file outputs the version in the package.json of project dir,
// and optionally add nightly postfix.
//
// It is used as a helper by the continuous integration.
const path = require('path')
const process = require('process')
const ver = require(path.join(__dirname, '../package.json')).version
if (process.argv[2] === 'nightly') {
const today = new Date()
console.log(
ver + '+nightly.' + today.toISOString().split('T')[0].replaceAll('-', '')
)
} else {
console.log(ver)
}