merge upstream

This commit is contained in:
onebeastchris 2024-06-21 01:15:28 +02:00
parent 40c67ca23c
commit 25d8f8a0e4
3 changed files with 6 additions and 5 deletions

View file

@ -75,7 +75,7 @@ tasks.processResources {
expand( expand(
"branch" to info.branch, "branch" to info.branch,
"buildNumber" to info.buildNumber, "buildNumber" to info.buildNumber,
"projectVersion" to project.version, "projectVersion" to info.version,
"commit" to info.commit, "commit" to info.commit,
"commitAbbrev" to info.commitAbbrev, "commitAbbrev" to info.commitAbbrev,
"commitMessage" to info.commitMessage, "commitMessage" to info.commitMessage,
@ -95,13 +95,13 @@ sourceSets {
property("branch", info.branch) property("branch", info.branch)
property("commit", info.commit) property("commit", info.commit)
property("repository", info.repository) property("repository", info.repository)
property("devVersion", info.isDev) property("devVersion", info.isDev.toString())
} }
} }
} }
} }
fun Project.buildNumber(): Int = fun buildNumber(): Int =
(System.getenv("BUILD_NUMBER"))?.let { Integer.parseInt(it) } ?: -1 (System.getenv("BUILD_NUMBER"))?.let { Integer.parseInt(it) } ?: -1
fun isDevBuild(branch: String, repository: String): Boolean { fun isDevBuild(branch: String, repository: String): Boolean {

View file

@ -34,4 +34,6 @@ public class BuildData {
public static final String BRANCH = "{{ branch }}"; public static final String BRANCH = "{{ branch }}";
public static final String COMMIT = "{{ commit }}"; public static final String COMMIT = "{{ commit }}";
public static final String REPOSITORY = "{{ repository }}"; public static final String REPOSITORY = "{{ repository }}";
public static final String DEV = "{{ devVersion }}";
} }

View file

@ -123,8 +123,7 @@ public class GeyserImpl implements GeyserApi {
public static final String COMMIT = BuildData.COMMIT; public static final String COMMIT = BuildData.COMMIT;
public static final String REPOSITORY = BuildData.REPOSITORY; public static final String REPOSITORY = BuildData.REPOSITORY;
@SuppressWarnings("ConstantValue") public static final boolean IS_DEV = Boolean.parseBoolean(BuildData.DEV);
public static final boolean IS_DEV = Boolean.parseBoolean("${dev}");
/** /**
* Oauth client ID for Microsoft authentication * Oauth client ID for Microsoft authentication