Use compute-version and compute-next-snapshot#49
Conversation
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>
391bf09 to
de031f6
Compare
artembilan
left a comment
There was a problem hiding this comment.
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 }} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 }} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Yes, I was thinking the same thing. I've added spring-io/spring-release-actions#99 to take a look
No description provided.