Calculate tag for releases based on package.json version (#9572)
* calculate tag for the release This is based on the name we use in the version e.g.: `3.2.0-beta.2`. If no name can be found in the version, we will default to `latest` * ignore node_modules caching for now
This commit is contained in:
parent
855fa300a0
commit
c2854dae71
6 changed files with 41 additions and 28 deletions
8
scripts/calculate-tag-name.js
Normal file
8
scripts/calculate-tag-name.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
let version = process.env.npm_package_version || require('../package.json').version
|
||||
|
||||
let match = /\d+\.\d+\.\d+-(.*)\.\d+/g.exec(version)
|
||||
if (match) {
|
||||
console.log(match[1])
|
||||
} else {
|
||||
console.log('latest')
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue