diff options
author | sualko <klaus@jsxc.org> | 2020-05-06 19:25:13 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2020-05-06 19:35:20 +0300 |
commit | 4563235a10855dc37c043826e14b30d9dc9d32ad (patch) | |
tree | b33530f02ccc67bc14d229c5424ef962df024fe1 | |
parent | 8da525e00313636a12cf27c74a68e0c7782a1785 (diff) |
build: fix publish script
-rw-r--r-- | scripts/publish-release.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/publish-release.js b/scripts/publish-release.js index a32bbeb..1dd5647 100644 --- a/scripts/publish-release.js +++ b/scripts/publish-release.js @@ -37,7 +37,7 @@ async function isRepoClean() { throw 'Repo not clean. Found staged files.'; } - if (status.modified.length > 0) { + if (status.modified.length > 2 || !status.modified.includes('package.json') || !status.modified.includes('appinfo/info.xml')) { throw 'Repo not clean. Found modified files.'; } @@ -163,7 +163,7 @@ function hasChangeLogEntry() { fs.readFile(path.join(__dirname, '..', 'CHANGELOG.md'), function (err, data) { if (err) throw err; - if (!data.includes(`## ${package.version}`)) { + if (!data.includes(`## ${package.version}`) && package.version.match(/^\d+\.\d+\.\d+$/)) { throw `Found no change log entry for ${package.version}`; } @@ -381,10 +381,10 @@ async function run() { await pull(); console.log('✔ pulled latest changes'.green); - // await isRepoClean(); + await isRepoClean(); console.log('✔ repo is clean'.green); - // await notAlreadyTagged(); + await notAlreadyTagged(); console.log('✔ not already tagged'.green); await lastCommitNotBuild(); @@ -399,6 +399,8 @@ async function run() { changeLog = await editChangeLog(changeLog); console.log('✔ change log updated'.green); + console.log(changeLog); + console.log('Press any key to continue...'); await keypress(); |