Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Conversation

@hlxid
Copy link
Member

@hlxid hlxid commented May 8, 2021

This fixes the problem that the cli gets built before semantic-releaser updates the version. Because of this the released 0.1.0 shows 0.0.1 when running nodecg-io --version because it was built with that version which copies the package.json into the build directory. Then semantic-release updates the version and the copied package.json isn't updated.

With this change we don't build the cli in a ci step anymore, but with the npm prepublish hook. That way semantic-release will bump the version and run npm publish which will then build the cli with the update version.

This fixes the problem that the cli gets built before semantic-releaser updates the version. Because of this the released `0.1.0` shows `0.0.1` when running `nodecg-io --version` because it was built with that version which copies the `package.json` into the `build` directory. Then semantic-release updates the version and the copied `package.json` isn't updated.

With this change we don't build the cli in a ci step anymore, but with the npm `prepublish` hook. That way semantic-release will bump the version and run `npm publish` which will then build the cli with the update version.
@hlxid hlxid self-assigned this May 8, 2021
@hlxid hlxid merged commit 6c5dfff into master May 8, 2021
@hlxid hlxid deleted the fix/version-in-releases branch May 8, 2021 16:15
@github-actions
Copy link

github-actions bot commented May 8, 2021

🎉 This PR is included in version 0.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

hlxid added a commit that referenced this pull request May 8, 2021
Follow up on #12

`prepublish` does not run on `npm publish` KEKW, only `prepublishOnly` does. Brilliant naming!
github-actions bot pushed a commit that referenced this pull request May 8, 2021
## [0.1.2](v0.1.1...v0.1.2) (2021-05-08)

### Bug Fixes

* build ts in prepublishOnly instead of prepublish because npm ([ab8cb09](ab8cb09)), closes [#12](#12)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants