Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong version number published to npm #503

Closed
dnlkoch opened this issue Sep 2, 2019 · 3 comments
Closed

Wrong version number published to npm #503

dnlkoch opened this issue Sep 2, 2019 · 3 comments

Comments

@dnlkoch
Copy link
Member

dnlkoch commented Sep 2, 2019

Using the current release script will lead to a release with an invalid version number on npmjs.com.

Reason: Because the target files will be copied to the dist folder before the version number will be increased by np, the package will be released with the preexisting verison number.

Note: The release of version 1.1.0 has been fixed manually.

@LukasLohoff
Copy link
Member

LukasLohoff commented Dec 11, 2019

Right now the npm release script doesn't work at all. It fails with

  ✔ Prerequisite check
  ✔ Git
  ↓ Cleanup [skipped]
  ✔ Prerequisite check
  ✔ Git
  ↓ Cleanup [skipped]
  ✔ Installing dependencies using npm
  ✔ Running tests using npm
  ✔ Bumping version using npm
  ✖ Publishing package using npm
    → The project was rolled back to its previous state.
    Pushing tags
    Creating release draft on GitHub

✖ Error publishing package:
Command failed with exit code 1: npm publish dist

To do a manual release we currently have to:

  • make sure all merge request are merged
  • run npm i and make sure the working tree is clean
  • bump the version in package.json and commit & push the changes
  • draft a new release on https://github.com/terrestris/BasiGX/releases
  • run npm run build
  • make sure the working tree is clean
  • check the version in dist/package.json, it should match the newly released version
  • run npm publish

@marcjansen
Copy link
Member

We should release a new version anyhow, so we cam revisit hiw this is right now.

@simonseyock
Copy link
Member

simonseyock commented Jun 4, 2021

The problem was that first the package was built to dist and then the current package.json was copied to dist. Afterwards the version bump was performed in the original package.json and in the end np tried to publish with the old one.

I fixed this with:

"postversion": "cp package.json dist/",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants