Skip to content

Commit

Permalink
Update util.d
Browse files Browse the repository at this point in the history
* Update PR
  • Loading branch information
abraunegg committed Dec 16, 2022
1 parent 70d185f commit 00add08
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/util.d
Original file line number Diff line number Diff line change
Expand Up @@ -439,17 +439,18 @@ void checkApplicationVersion() {
releaseGracePeriod.fracSecs = Duration.zero;
// roll the grace period forward to allow distributions to catch up based on their release cycles
releaseGracePeriod = releaseGracePeriod.add!"months"(1);

// what is this clients version?
auto currentVersionArray = strip(strip(import("version"), "v")).split("-");
string applicationVersion = currentVersionArray[0];

// debug output
log.vdebug("applicationVersion: ", applicationVersion);
log.vdebug("latestVersion: ", latestVersion);
log.vdebug("publishedDate: ", publishedDate);
log.vdebug("currentTime: ", currentTime);
log.vdebug("releaseGracePeriod: ", releaseGracePeriod);

// what is this clients version?
auto currentVersionArray = strip(strip(import("version"), "v")).split("-");
string applicationVersion = currentVersionArray[0];

// display details if not current
if (applicationVersion != latestVersion) {
// is application version is older than available on GitHub
Expand All @@ -460,8 +461,8 @@ void checkApplicationVersion() {
if (releaseGracePeriod.toUnixTime() > currentTime.toUnixTime()) {
writeln();
log.logAndNotify("INFO: A new onedrive client version is available. Please upgrade your client version when possible.");
log.vlog("Current Application Version: ", applicationVersion);
log.vlog("Version Available: ", latestVersion);
log.log("Current Application Version: ", applicationVersion);
log.log("Version Available: ", latestVersion);
writeln();
} else {
// outside grace period
Expand Down

0 comments on commit 00add08

Please sign in to comment.