mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-06-21 14:00:57 -04:00
Better separate staging environment [stage]
This commit is contained in:
@@ -74,6 +74,7 @@ public class App extends Application {
|
||||
() -> {
|
||||
var base = String.format(
|
||||
"X-Pipe Desktop (%s)", AppProperties.get().getVersion());
|
||||
var prefix = AppProperties.get().isStaging() ? "[STAGE] " : "";
|
||||
var suffix = XPipeDistributionType.get().getUpdateHandler().getPreparedUpdate().getValue() != null
|
||||
? String.format(
|
||||
" (Update to %s ready)",
|
||||
@@ -82,7 +83,7 @@ public class App extends Application {
|
||||
.getValue()
|
||||
.getVersion())
|
||||
: "";
|
||||
return base + suffix;
|
||||
return prefix + base + suffix;
|
||||
},
|
||||
XPipeDistributionType.get().getUpdateHandler().getPreparedUpdate());
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ public class AppProperties {
|
||||
UUID buildUuid;
|
||||
String sentryUrl;
|
||||
boolean image;
|
||||
boolean staging;
|
||||
Path dataDir;
|
||||
|
||||
public AppProperties() {
|
||||
@@ -51,6 +52,9 @@ public class AppProperties {
|
||||
.orElse(UUID.randomUUID());
|
||||
sentryUrl = System.getProperty("io.xpipe.app.sentryUrl");
|
||||
dataDir = parseDataDir();
|
||||
staging = Optional.ofNullable(System.getProperty("io.xpipe.app.staging"))
|
||||
.map(Boolean::parseBoolean)
|
||||
.orElse(false);
|
||||
}
|
||||
|
||||
public static void logSystemProperties() {
|
||||
|
||||
@@ -33,7 +33,7 @@ public class AppDownloads {
|
||||
.withRateLimitHandler(RateLimitHandler.FAIL)
|
||||
.withAuthorizationProvider(AuthorizationProvider.ANONYMOUS)
|
||||
.build();
|
||||
repository = github.getRepository("xpipe-io/xpipe");
|
||||
repository = github.getRepository(AppProperties.get().isStaging() ? "xpipe-io/xpipe_staging" : "xpipe-io/xpipe");
|
||||
return repository;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user