standard-version only bumping patch version in pipeline [azure]
Closed this issue · 1 comments
Describe the bug
I'm not sure whether it's a bug or whether I've missed something but I'm giving it a shot :)
I've created a pipeline that's incrementing the version and pushes the changes to master but I've noticed that when I commit
feature changes for instance, locally the version is bumped correctly, yet in the pipeline only the patch version is being incremented.
Current behavior
locally:
from version 1.0.31 -> 1.1.0
in pipeline:
from version 1.0.31 -> 1.0.32
Expected behavior
the pipeline should increment the same as it did locally
Environment
standard-version
version(s): v9.5.0- Node/npm version: Node 20, npm 10
- OS: Windows 10
Possible Solution
Additional context
pipeline yml:
`trigger:
- master
pool:
name: default
variables:
HUSKY: 0
husky_skip_init: true
steps:
-
checkout: self
persistCredentials: true -
task: NodeTool@0
inputs:
versionSpec: '20.x'
displayName: 'Install Node.js' -
task: npmAuthenticate@0
inputs:
workingFile: "$(Build.SourcesDirectory)/MyProject/.npmrc"
customEndpoint: "****" -
script: |
echo "##cd $(Build.SourcesDirectory)/MyProject"
cd $(Build.SourcesDirectory)/MyProject
echo "##npm ci"
npm ci
displayName: 'Installing packages' -
script: |
echo "##cd $(Build.SourcesDirectory)/MyProject"
cd $(Build.SourcesDirectory)/MyProject
echo "##npm run release"
npm run release
displayName: 'Bumping version' -
script: |
echo "##cd $(Build.SourcesDirectory)/MyProject"
cd $(Build.SourcesDirectory)/MyProject
echo "##git push --follow-tags origin master"
git push --follow-tags origin HEAD:master
echo "##npm publish"
npm publish
displayName: 'Publishing version' -
checkout: self
clean: true`
I assume you figured this out already, but for future users- you need to set checkout to be a full checkout: