Tweak: release build action

This commit is contained in:
33 committed 2023-01-13 15:22:29 +08:00
1 parent d767f40d32
commit 69d35a69b7
7 files changed
+16 -8

No files matched your search

@@ -8,8 +8,12 @@ import java.util.stream.Collectors;
public class VersionUtil {
public static boolean isRelease(Project rootProject) {
String s = ConfigUtil.getConfigString(rootProject, "snapshot");
return s == null || s.equals("") || s.equals("0");
String s = System.getenv("IS_SNAPSHOT");
// When we cannot find environment variable, it means we are in development, so it is not a release
if (s == null) {
return false;
}
return s.equals("0") || s.equals("false");
}
public static boolean isSnapshot(Project rootProject) {