File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6565
6666 - name : Get project version
6767 id : get_version
68- run : echo "PROJECT_VERSION=$(./gradlew properties -q -Pprop=version )" >> $GITHUB_ENV
68+ run : echo "PROJECT_VERSION=$(./gradlew -q printVersion )" >> $GITHUB_ENV
6969
7070 - name : Generate tag name
7171 id : generate_tag # id is not strictly needed here as we are using GITHUB_ENV but good practice
Original file line number Diff line number Diff line change @@ -89,3 +89,15 @@ tasks.register<Jar>("bwextension") {
8989tasks.named(" build" ) {
9090 dependsOn(" bwextension" )
9191}
92+
93+ // Task to print just the version for CI/CD
94+ tasks.register(" printVersion" ) {
95+ group = " help"
96+ description = " Prints the project version"
97+ doLast {
98+ // Use System.out.print to avoid extra newlines
99+ print (project.version)
100+ }
101+ // Ensure this task doesn't show progress
102+ logging.captureStandardOutput(LogLevel .QUIET )
103+ }
You can’t perform that action at this time.
0 commit comments