Skip to content

Automate rolling of SNAPSHOT version in pom#1438

Merged
bodiam merged 3 commits intodatafaker-net:mainfrom
kingthorin:pom-roll
Nov 18, 2024
Merged

Automate rolling of SNAPSHOT version in pom#1438
bodiam merged 3 commits intodatafaker-net:mainfrom
kingthorin:pom-roll

Conversation

@kingthorin
Copy link
Copy Markdown
Collaborator

@kingthorin kingthorin commented Nov 11, 2024

Follow-up to discussion in: #1412

@kingthorin kingthorin changed the title Pom roll Automate rolling of SNAPSHOT version in pom Nov 11, 2024
@codecov-commenter

This comment was marked as off-topic.

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git checkout -b $BRANCH
./mvnw build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming x.y.z it'll always be z that's incremented.

We can always edit the PR or change it manually at any time.

If we want minor (y) incremented on most releases I can likely revise it for that as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance we can make this an input? I think we don't often make a Z change (I hope not, since they are bugfixes), but sometimes it's an Y, sometimes Z, so it would be nicer if I can just type in : next version is 2.5.0 (or 2.4.2), bit more explicit.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to kick it off manually then yes you could have an input.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, this is created as part of the releases? In that case, can't we use the release version here?

Copy link
Copy Markdown
Collaborator Author

@kingthorin kingthorin Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could probably rewrite this to do that but it wouldn't really make the situation any better. Having the existing version doesn't give any hint what element to increment.

I think the best plan is to just switch to incrementing the minor version (y) which as you described above should be correct in the majority of circumstances.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, we're talking about the next/snapshot version, my bad. In that case, I think it doesn't matter if we increment y or z right? (I mean, if 2.5.2-SNAPSHOT results in a 2.6.0 release, I don't think anyone would mind a huge deal)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, and we can always adjust it manually at any time between releases if necessary/wanted.

@kingthorin
Copy link
Copy Markdown
Collaborator Author

@bodiam good to go for now?

@bodiam bodiam merged commit cda7fb2 into datafaker-net:main Nov 18, 2024
@kingthorin kingthorin deleted the pom-roll branch November 18, 2024 14:23
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

Successfully merging this pull request may close these issues.

3 participants