I have a NodeJS project and I want to capture the BITBUCKET_BUILD_NUMBER in package.json. Can this be done in my Bitbucket pipeline build? Below is what I added to my bitbucket-pipelines.yml.
# update the package.json BUILD_NUMBER propertie
- npm pkg set BUILD_NUMBER="${BITBUCKET_BUILD_NUMBER}"
- npm pkg set description="Build Number ${BUILD_NUMBER} `date '+%Y-%m-%d %H:%M:%S'`"
- git commit package.json -m "Automated build commit on `date '+%Y-%m-%d %H:%M:%S'`"
- git push
I am getting errors on git "bash: git: command not found".