File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -605,7 +605,12 @@ fun replaceVersion(ver: String) {
605605}
606606
607607tasks.register(" replaceNewVersion" ) {
608- val releaseVersion = project.properties[" newVersion" ]?.toString() ? : " 0.0.0"
608+ val releaseVersion =
609+ if (project.hasProperty(" newVersion" )) {
610+ project.property(" newVersion" ) as String
611+ } else {
612+ " 0.0.0"
613+ }
609614 doLast {
610615 val lastVersions = releaseVersion.substringAfter(" v" ).split(" ." )
611616 val major = lastVersions[0 ].toInt()
@@ -620,9 +625,11 @@ tasks.register("replaceNewVersion") {
620625
621626tasks.register(" replaceDraftVersion" ) {
622627 val draftVersion =
623- project.properties[" draftVersion" ]
624- .toString()
625- .substringBefore(" -beta" )
628+ if (project.hasProperty(" draftVersion" )) {
629+ project.property(" draftVersion" ) as String
630+ } else {
631+ " 0.0.0"
632+ }
626633
627634 doLast {
628635 println (" Release DraftVersion: $draftVersion " )
You can’t perform that action at this time.
0 commit comments