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

fix(): correct version being used in CLI package [PHX-2553] #2001

Merged
merged 3 commits into from
Apr 21, 2023

Conversation

andreascful
Copy link
Contributor

Summary

There have been problems with printing out the package version #1800

This PR moves the building of the package to the prePublishOnly script so that the version is correctly set by semantic-release before it is bundled up.

@andreascful andreascful requested a review from a team April 20, 2023 08:55
@marcolink
Copy link
Member

You could try dry-running it!

npx semantic-release --dry-run --no-ci

@andreascful
Copy link
Contributor Author

andreascful commented Apr 20, 2023

You could try dry-running it!

npx semantic-release --dry-run --no-ci

Good idea, unfortunately, it doesn't work for me. I get this error, not quite sure why.

An error occurred while running semantic-release: Error: Command failed with exit code 1: git fetch --tags --update-head-ok https://github.com/contentful/contentful-cli.git +refs/heads/master:refs/heads/master
From https://github.com/contentful/contentful-cli
   a77b6d6..233eea4  master         -> master
 ! [rejected]        v1.15.0        -> v1.15.0  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.1  -> v2.0.0-beta.1  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.10 -> v2.0.0-beta.10  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.11 -> v2.0.0-beta.11  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.12 -> v2.0.0-beta.12  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.2  -> v2.0.0-beta.2  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.3  -> v2.0.0-beta.3  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.4  -> v2.0.0-beta.4  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.5  -> v2.0.0-beta.5  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.6  -> v2.0.0-beta.6  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.7  -> v2.0.0-beta.7  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.8  -> v2.0.0-beta.8  (would clobber existing tag)
 ! [rejected]        v2.0.0-beta.9  -> v2.0.0-beta.9  (would clobber existing tag)

@ruderngespra
Copy link
Contributor

ruderngespra commented Apr 20, 2023

My output:

16:29 $ npx semantic-release --dry-run --no-ci
[4:29:35 PM] [semantic-release] › ℹ  Running semantic-release version 20.1.1
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[4:29:35 PM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[4:29:47 PM] [semantic-release] › ℹ  This test run was triggered on the branch fix/version-message, while semantic-release is configured to only publish from master, therefore a new version won’t be published.

@andreascful andreascful changed the title fix(): ensure correct version is being used in the released CLI package [PHX-2553] fix(): correct version being used in CLI package [PHX-2553] Apr 21, 2023
@andreascful andreascful merged commit 2d64b6d into master Apr 21, 2023
@andreascful andreascful deleted the fix/version-message branch April 21, 2023 07:38
@contentful-automation
Copy link

🎉 This PR is included in version 2.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

3 participants