File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
src/main/java/pink/zak/minestom/operadora/config Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ tasks {
41
41
processResources {
42
42
expand(mapOf (
43
43
" version" to version,
44
- " build_number" to if (System .getenv (" BUILD_NUMBER" ) == null ) " unknown " else System .getenv(" BUILD_NUMBER" ),
45
- " commit_hash" to if (System .getenv (" BUILD_VCS_NUMBER" ) == null ) " unknown " else System .getenv(" BUILD_VCS_NUMBER" )
44
+ " build_number" to if (hasProperty (" BUILD_NUMBER" )) System .getenv(" BUILD_NUMBER" ) else " unknown " ,
45
+ " commit_hash" to if (hasProperty (" BUILD_VCS_NUMBER" )) System .getenv(" BUILD_VCS_NUMBER" ) else " unknown "
46
46
))
47
47
}
48
48
named<Test >(" test" ) {
@@ -63,7 +63,7 @@ publishing {
63
63
}
64
64
repositories {
65
65
maven {
66
- val isSnapshot = System .getenv (" BUILD_NUMBER" ) != null
66
+ val isSnapshot = hasProperty (" BUILD_NUMBER" )
67
67
url = uri(mavenRepo + (if (isSnapshot) " /snapshots" else " /releases" ))
68
68
69
69
credentials {
Original file line number Diff line number Diff line change @@ -13,15 +13,13 @@ public static OperadoraMeta load() {
13
13
try {
14
14
String jsonString = new String (FileUtils .class .getClassLoader ().getResourceAsStream ("operadora.json" ).readAllBytes ());
15
15
JsonObject jsonObject = JsonParser .parseString (jsonString ).getAsJsonObject ();
16
- System .out .println (jsonString );
17
- System .out .println (jsonObject );
18
16
return new OperadoraMeta (
19
17
jsonObject .get ("version" ).getAsString (),
20
18
jsonObject .get ("buildNumber" ).getAsString (),
21
19
jsonObject .get ("commitHash" ).getAsString ()
22
20
);
23
21
} catch (Exception ex ) {
24
- LOGGER .error ("Error loading OperadoraMeta (MANIFEST.MF) " , ex );
22
+ LOGGER .error ("Error loading OperadoraMeta" , ex );
25
23
return null ;
26
24
}
27
25
}
You can’t perform that action at this time.
0 commit comments