I am trying to run an NPM script that relies on a variable that needs to be assigned at runtime.
package.json
{
"version": "4.0.10",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"set-version": "VERSION=(sentry-cli releases propose-version)",
"release": "sentry-cli releases new -p internal-app $VERSION --finalize",
...
}
}
I've attempted to set the variable in the set-version script however once I run release, the variable is not known.
How can I set this up so that when I run npm run release the variable $VERSION is known?