Skip to content

Use compute-version and compute-next-snapshot#49

Merged
artembilan merged 5 commits intospring-io:mainfrom
jzheaux:compute-version
Mar 27, 2026
Merged

Use compute-version and compute-next-snapshot#49
artembilan merged 5 commits intospring-io:mainfrom
jzheaux:compute-version

Conversation

@jzheaux
Copy link
Copy Markdown
Contributor

@jzheaux jzheaux commented Mar 26, 2026

No description provided.

jzheaux added 5 commits March 26, 2026 17:39
Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@artembilan artembilan left a comment

Choose a reason for hiding this comment

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

Thanks, Josh!
I left a couple questions/concerns.
Will wait for your answer and merge.
Even if I think that is a bit an overhead to use extra step for that, but still better to have unified API without duplication.

So, after your confirmation what I've just comment on the lines, I'm going to merge this as is and start looking into extraction of that Build Name into separate action.


if [ $branchVersion = 'main' ]; then
snapshotVersion=$(cat gradle.properties | sed -n '/^version=/ { s/^version=//;p }')
snapshotVersion=${{ steps.compute-version.outputs.version }}
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.

Pay attention how this is optional only if our branch is main.
I don't think extra step in this composite action would bring any value instead of this single line bash script.


- name: Compute Version
id: compute-version
uses: spring-io/spring-release-actions/compute-version@0.0.3
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.

It is not related to your contribution, but I think it is important to say in the docs for this action that actions/setup-java is required in case if Maven.
Because this action calls Maven: mvn help:evaluate


if [ $branchVersion = 'main' ]; then
snapshotVersion=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)
snapshotVersion=${{ steps.compute-version.outputs.version }}
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.

Well. One more time.
I think I'll take your change as is: looks like this Evaluate Build Name step deserves its one GH Action.
It is really used in in similar way in many places: for Gradle, Maven, in release and SNAPSHOT builds.

But that is different story.
Thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was thinking the same thing. I've added spring-io/spring-release-actions#99 to take a look

@artembilan artembilan merged commit 8577caf into spring-io:main Mar 27, 2026
2 checks passed
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.

2 participants