Skip to content

Commit

Permalink
Fix snapshot commit for release versions
Browse files Browse the repository at this point in the history
  • Loading branch information
booky10 committed Jul 9, 2024
1 parent 14548f5 commit 41224c9
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ abstract class PEVersionTask : DefaultTask() {
public final class PEVersions {
public static final String RAW = "$version";
public static final PEVersion CURRENT = new PEVersion(${ver.major}, ${ver.minor}, ${ver.patch}, "${ver.snapshotCommit}");
public static final PEVersion CURRENT = new PEVersion(${ver.major}, ${ver.minor}, ${ver.patch}, ${ver.quotedSnapshotCommit()});
public static final PEVersion UNKNOWN = new PEVersion(0, 0, 0);
private PEVersions() {
Expand Down Expand Up @@ -73,6 +73,13 @@ abstract class PEVersionTask : DefaultTask() {
)
}
}

fun quotedSnapshotCommit(): String {
if (snapshotCommit == null) {
return "null"
}
return "\"$snapshotCommit\"";
}
}

}

0 comments on commit 41224c9

Please sign in to comment.