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

chore(release): Pre-releases should use next version #1257

Merged
merged 12 commits into from
Nov 8, 2021

Conversation

jsteinich
Copy link
Collaborator

@jsteinich jsteinich commented Nov 5, 2021

This takes care of the main part of #561. Also includes some tools to help with #656.

Using standard-version to handle bumping the version number in a manner similar to semantic-release but without the release.

Can run yarn prepare-release or yarn prepare-release --release-as minor when preparing for an actual release to bump the version and generate the changelog.

Follow up:
We also discussed changing the qualifier. For at least Java that would probably be a good idea; however, there isn't an easy way to change for just 1 language. Probably makes sense to hold off on any changes until we get actual user feedback requesting changes.

@skorfmann
Copy link
Contributor

Awesome, thanks! So, this would work like this when merging the PR?

Target current release version pre-release
NPM 0.7.0 0.8.0-pre.500
pypi 0.7.0 0.8.0.dev500
nuget 0.7.0 0.8.0-pre.500
maven 0.7.0 0.8.0-pre.500

@jsteinich
Copy link
Collaborator Author

this would work like this when merging the PR?

Yep.
It increments the pre-release version each time rather than using the github build number, so technically it will start with 0.8.0-pre.0, but we should have a tag to be able to track the exact commit if needed.

@jsteinich jsteinich force-pushed the pre_release_version_number branch from 6c0d2e1 to 458e3dc Compare November 5, 2021 13:35
@jsteinich
Copy link
Collaborator Author

I've been doing some testing here: https://github.com/jsteinich/standard-version-test

I think that I've run into conventional-changelog/standard-version#724 as everything worked for the 1st pre-release, but failed on the next one.

@jsteinich jsteinich marked this pull request as ready for review November 6, 2021 14:38
@jsteinich
Copy link
Collaborator Author

I did some more investigation and managed to get things working.

I'm not going to update the release instructions quite yet since the release changelog generation hasn't been fully tested yet. I figure we can try it out with the next release and compare to the existing script. Since that is a secondary goal, if it doesn't work we can just not use it and continue iterating or remove.

@skorfmann
Copy link
Contributor

Seems to work as expected:

✗ yarn prepare-next-release
yarn run v1.22.5
$ standard-version --prerelease pre --release-as minor --skip.changelog=true --skip.commit=true
✔ bumping version in package.json from 0.7.0 to 0.8.0-pre.1
✔ bumping version in packages/cdktf-cli/package.json from 0.0.0 to 0.8.0-pre.1
✔ bumping version in packages/cdktf/package.json from 0.0.0 to 0.8.0-pre.1
✔ bumping version in packages/@cdktf/hcl2cdk/package.json from 0.0.0 to 0.8.0-pre.1
✔ bumping version in packages/@cdktf/hcl2json/package.json from 0.0.0 to 0.8.0-pre.1
✔ bumping version in packages/@cdktf/provider-generator/package.json from 0.0.0 to 0.8.0-pre.1
✔ tagging release v0.8.0-pre.1
ℹ Run `git push --follow-tags origin pr/jsteinich/1257 && npm publish --tag pre` to publish

Is there anything else missing or would you consider this as good to go @jsteinich ?

@jsteinich
Copy link
Collaborator Author

Is there anything else missing or would you consider this as good to go

@skorfmann I think it is good to go.

@skorfmann skorfmann merged commit c0a13c5 into hashicorp:main Nov 8, 2021
skorfmann added a commit that referenced this pull request Nov 8, 2021
…umber"

This reverts commit c0a13c5, reversing
changes made to f2b6856.
skorfmann added a commit that referenced this pull request Nov 8, 2021
chore(release): Revert "Merge pull request #1257 from jsteinich/pre_release_version_n…
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants