-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include wip build in --version. publish to homebrew tap.
- Loading branch information
Showing
5 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tessellate-main/src/main/java/io/clusterless/tessellate/util/VersionProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (c) 2023 Chris K Wensel <[email protected]>. All Rights Reserved. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package io.clusterless.tessellate.util; | ||
|
||
import picocli.CommandLine; | ||
|
||
public class VersionProvider implements CommandLine.IVersionProvider { | ||
@Override | ||
public String[] getVersion() throws Exception { | ||
return new String[]{Versions.clsVersion()}; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
tessellate-main/src/main/java/io/clusterless/tessellate/util/Versions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2023 Chris K Wensel <[email protected]>. All Rights Reserved. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package io.clusterless.tessellate.util; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.Properties; | ||
|
||
public class Versions { | ||
public static final String WIP = "1.0-wip-dev"; | ||
|
||
public static String clsVersion() { | ||
Properties properties = new Properties(); | ||
|
||
try { | ||
properties.load(resourceAsStream()); | ||
} catch (IOException e) { | ||
return WIP; | ||
} | ||
|
||
return properties.getProperty("release.full", WIP); | ||
} | ||
|
||
@Nullable | ||
private static InputStream resourceAsStream() { | ||
return Versions.class.getClassLoader().getResourceAsStream("version.properties"); | ||
} | ||
} |