Standard-version: Version at package.json not being bumped on CI environment

Created on 17 Jul 2018  路  7Comments  路  Source: conventional-changelog/standard-version

Hello,

Obviously I'm misunderstanding something about this library.
I expect it to:

  1. bump version in package.json
  2. outputting changes to CHANGELOG
  3. committing package.json and CHANGELOG.md
  4. tag a release

Every time I try it on local it does exactly that, but when I do it on my CI environment the output is almost the same, except a little detail, it does not bump the package.json. The weird thing is that it creates the release tag that corresponds to the package.json version that it didn't made.

Instead it does:

  1. outputting changes to CHANGELOG.md
  2. committing CHANGELOG.md
  3. tagging release v1.3.0

If it properly detects that the version should be 1.3.0, why it is not bumping the package.json ?
Taking a look at the generated changelog it only generates the changelog for the previous version, 1.2.0, so there is some weird alignment here...

Thanks in advance

help wanted

Most helpful comment

This was happening to me as well. I found it was due to this line that prevents updating any files that are .gitignored.

In our docker container:

root@fb0d6b9dfaec:/build/src# cat .gitignore
...
# Packaged application
build
...

And package.json was in /build/src/package.json. Due to the build line in .gitignore, the bump lifecycle was ignoring /build/src/package.json.

The fix is either to make the .gitignore more specific or to mount the application to a different path.

All 7 comments

Hello,

Could you please provide me some hints to troubleshoot this ? On muy local machine works perfectly, but fails on CI, if you know about any behavior that could explain that I'll ve very grateful

Hello again.
This problem is getting critical for us. I'll thank any advice

I have this same issue in my local machine when using 4.4.0 and 4.3.0 versions. The 4.2.0 is bumping the version.

I'm using 4.2.0, so it should not be something related to the version but the environment. I took a look at the entire codebase and I didn't saw anything (not default configuration neither logic) that justifies this behavior.

Getting this exact issue, only on CI, it bumps versions ok on local

Actually reverting back to 4.2.0 did the trick for me! must have something to do with the skip change in 4.3.0

This was happening to me as well. I found it was due to this line that prevents updating any files that are .gitignored.

In our docker container:

root@fb0d6b9dfaec:/build/src# cat .gitignore
...
# Packaged application
build
...

And package.json was in /build/src/package.json. Due to the build line in .gitignore, the bump lifecycle was ignoring /build/src/package.json.

The fix is either to make the .gitignore more specific or to mount the application to a different path.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jefftienchow picture jefftienchow  路  5Comments

joefraley picture joefraley  路  6Comments

gultyaev picture gultyaev  路  4Comments

sarbbottam picture sarbbottam  路  3Comments

noreiller picture noreiller  路  5Comments