conventional-changelog/standard-version

Does not commit bumped version number in package.json on Bitbucket pipelines

Open

#434 opened on Aug 17, 2019

View on GitHub
 (7 comments) (2 reactions) (0 assignees)JavaScript (7,442 stars) (825 forks)batch import
bughelp wanted

Description

I am having trouble using this in Bitbucket pipeline. It is consistently committing the changelog witout committing the package.json and the bumped version number.(Resulting in the same release version each time). I tried:

  • useing barebones configuration to call only standard-version without any flags.
  • adding the --commit-all and -a flag
  • manually calling git add package.json in precommit and release hook.
  • removed all hooks

It works perfectly in local environment, I am not sure what I am missing.

Version: 7.0.0

Release Commit: image

Package.json

"scripts": {
    "release": "standard-version --no-verify --prerelease beta"
}, 
...
 "standard-version": {
    "scripts": {
      "postbump": "git add package.json",
      "precommit": "echo \"[skip ci]\""
    },
    "skip": {
      "tag": true
    }
  }

Bitbucket PIpeline


# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:10.15.3

pipelines:
  default:
    - step:
        caches:
          - node
        script: # Modify the commands below to build your repository.
          - echo "Hi"
  branches:
    master:
      - step:
          caches:
            - node
          script:
            - npm install
            - npm run release
            - git push origin master

Contributor guide