Skip to content

Commit

Permalink
Build script: don't crash if updating version with no unreleased sect…
Browse files Browse the repository at this point in the history
…ion in Changelog.md
  • Loading branch information
stkb committed Nov 23, 2021
1 parent db77d47 commit 605a975
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions do
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,15 @@ function getSetVersion ()
function replaceInFile (path, re, rep) {
const cnt = FS.readFileSync (path, 'utf8'), match = cnt.match(re)
if (!match) return;
FS.writeFileSync (path, cnt.replace(match[0], match[0].replace(match[1], rep)))
}
}
function publish () {
let stats
try { stats = FS.statSync(vscodeVsix) } catch {
try { stats = FS.statSync(vscodeVsix) } catch {
exit (1, `No VSIX file at ${vscodeVsix}. Run './do package' and test the VSIX file first.`)
}
if(stats.mtimeMs < (new Date()).valueOf() - 600000)
Expand Down Expand Up @@ -178,7 +179,7 @@ function buildCore ({production} = {}) {
const paj = x => `.obj/.net/${x}/project.assets.json`
if (notExists (paj ('core'), paj ('test')))
run ("Restoring dependencies", "dotnet restore core/Core.Test.fsproj")
const fableArgs = 'core/Core.Test.fsproj -o core/dist/dev --noRestore'
if (watch) {
Expand Down

0 comments on commit 605a975

Please sign in to comment.