Skip to content

Commit

Permalink
Fix issue with incorrect -DEV suffix in release.
Browse files Browse the repository at this point in the history
The elvis operator returns the alternate branch if the condition is an empty string:

```groovy
groovy:000> "" ?: "pouet"
===> pouet

```
  • Loading branch information
tychobrailleur committed Jun 29, 2024
1 parent 791d616 commit 2fc7c3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ version = '8.0'
ext {
// Development_stage (DEV:0 BETA:1 STABLE:2)
development_stage = project.properties['DEV_STAGE'] as Integer ?: 0
version_type = ["-DEV", "-BETA", ""].get(development_stage) ?: '-DEV'
version_type = ["-DEV", "-BETA", ""].get(development_stage)
target_dir = "${buildDir}/artefacts"
}

Expand Down

0 comments on commit 2fc7c3a

Please sign in to comment.