Skip to content

Commit

Permalink
fixup! Update tests to use create-release-archive script
Browse files Browse the repository at this point in the history
  • Loading branch information
lfdebrux committed Jun 16, 2022
1 parent 6eddedd commit a9f8022
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/create-release-archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Options
-h, --help
Options (advanced):
-d DIR, --destDir DIR
--destDir DIR
--releaseVersion VERSION
`)
}

Expand All @@ -29,9 +30,12 @@ function parseArgs (args) {

if (arg === '-h' || arg === '--help') {
argv.help = true
} else if (arg === '-d' || arg === '--destDir') {
} else if (arg === '--destDir') {
i++
argv.dest = args[i]
} else if (arg === '--releaseName') {
i++
argv.releaseName = args[i]
} else {
argv._.push(arg)
}
Expand Down Expand Up @@ -59,8 +63,8 @@ function cli () {
}

const ref = argv.ref || 'HEAD'
const version = getReleaseVersion(argv.ref)
const newVersion = isNewVersion(version) ? 'new version' : 'version'
const version = argv.releaseName || getReleaseVersion(argv.ref)
const newVersion = !argv.releaseName && isNewVersion(version) ? 'new version' : 'version'

console.log(`Creating release archive for ${newVersion} ${version}`)

Expand Down

0 comments on commit a9f8022

Please sign in to comment.