I have setup a test pipeline and deployment pipeline.
During deployment I'd like to get package.json version and put the value in a new variable.
I have found some ways that work in bash like:
first creation a version script in package.json that return the version:
"version": "echo $npm_package_version"
Then assigning the result to a variable.
$VERSION=$(npm run version --silent)
Is there a way to do this in the pipeline?
When trying I get an error :
<span>bash: =1.0.6: command not found</span><span>+ $VERSION=$(npm run version --silent)</span>
<span>It retrieves the version number but still throws an error ?</span>
<span>any suggestions are welcome</span>