question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--prerelease flag only increase build number

See original GitHub issue

.versionrc

  "bumpFiles": [
    {
      "filename": "package.json",
      "type": "json"
    },
    {
      "filename": "package-lock.json",
      "type": "json"
    },
    {
      "filename": "client/package.json",
      "type": "json"
    },
    {
      "filename": "client/package-lock.json",
      "type": "json"
    }
  ],
  "types": [
        {"type": "feat", "section": "Features"},
        {"type": "fix", "section": "Bug Fixes"},
        {"type": "chore", "section": "Chores"},
        {"type": "docs", "section": "Documentation"},
        {"type": "style", "section": "Code Style/Formatting"},
        {"type": "refactor", "section": "Refactoring"},
        {"type": "perf", "hidden": true},
        {"type": "test", "hidden": true}
    ]
}

git log since last release

* 16f8b3a8d (HEAD -> release/v1.8.0) fix(join now): date of birth fixes
* 8afa0458e (origin/release/v1.7.0-rc.0/backmerge, origin/dev, origin/HEAD, release/v1.7.0-rc.0/backmerge, dev) feat(joinnow): add aria label to all textfields
* 4c0da2d53 (tag: v1.7.0-rc.0, origin/uat, origin/release/v1.7.0, uat, release/v1.7.0) chore(release): 1.7.0-rc.0

npm prerelease script used to bump up the version

standard-version --no-verify --prerelease rc

Expected version number = v1.8.0-rc.0 Actual version number = v1.7.0-rc.1

Is anyone else experiencing this? Happened for v1.7 for me as well so I had to manually do a --release-as.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
rfgamaralcommented, May 6, 2020

Haven’t tested the first option but it feels like something we don’t want to do. As for the second one, tried it, didn’t work as simple as that, but this did:

"release:sample:major": "git-branch-is sample && standard-version --skip.changelog --skip.commit --skip.tag --release-as major && standard-version --no-verify --skip.changelog --skip.tag --prerelease sample --release-as major",
"release:sample:minor": "git-branch-is sample && standard-version --skip.changelog --skip.commit --skip.tag --release-as minor && standard-version --no-verify --skip.changelog --skip.tag --prerelease sample --release-as minor",
"release:sample:patch": "git-branch-is sample && standard-version --skip.changelog --skip.commit --skip.tag --release-as patch && standard-version --no-verify --skip.changelog --skip.tag --prerelease sample --release-as patch"

It’s a bit complex and verbose but it does the trick for now. I wish there was something simpler like npm version above though…

1reaction
rfgamaralcommented, Apr 28, 2020

Yes, however, npm version command does things a bit differently, example:

/c/Users/Ricardo/Downloads/test
❯ npm version major
v2.0.0

/c/Users/Ricardo/Downloads/test
❯ npm version premajor
v3.0.0-0

/c/Users/Ricardo/Downloads/test
❯ npm version premajor
v4.0.0-0

/c/Users/Ricardo/Downloads/test
❯ npm version premajor --preid=sample
v5.0.0-sample.0

/c/Users/Ricardo/Downloads/test
❯ npm version premajor --preid=sample
v6.0.0-sample.0

/c/Users/Ricardo/Downloads/test
❯ npm version prerelease --preid=sample
v6.0.0-sample.1

/c/Users/Ricardo/Downloads/test
❯ npm version prerelease --preid=sample
v6.0.0-sample.2

/c/Users/Ricardo/Downloads/test
❯ npm version prerelease --preid=sample
v6.0.0-sample.3

What’s happenning here?

  • npm version premajor is always bumping the major version and adding -0 to the end;
  • npm version premajor --preid=sample is always is always bumping the major version and adding -sample.0 to the end;
  • npm version prerelease is the only command which increments the X in the major.minor.patch-preid.X version.

I’m personally trying to mimic the behavior of npm version premajor --preid=sample with standard-version but I’m not sure it’s a functionality currently provided.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prerelease Module Versions - PowerShell - Microsoft Learn
Identifying a module version as a prerelease ... Acquiring prerelease packages requires adding -AllowPrerelease flag to the PowerShellGet ...
Read more >
How to publish nuget prerelease version package
This will publish your client as prerelease version. Important Tip: Suppose, you want to test a version 7.6.6.4 , then you can add...
Read more >
@lerna/version - npm
Running lerna version --conventional-commits without the above flags will release current changes as prerelease only if the version is already in prerelease ......
Read more >
Version vs VersionSuffix vs PackageVersion: What do they all ...
NET also contains a plethora of version numbers for you to add to your ... VersionSuffix is used to set the pre-release label...
Read more >
MinVer 4.2.0 - NuGet
There is a newer prerelease version of this package available. See the version list below for details. ... dotnet add package MinVer --version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found