forked from utPLSQL/utPLSQL-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCliVersionInfo.java
More file actions
41 lines (32 loc) · 1.13 KB
/
CliVersionInfo.java
File metadata and controls
41 lines (32 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package org.utplsql.cli;
import org.utplsql.api.JavaApiVersionInfo;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
/**
* This class is getting updated automatically by the build process.
* Please do not update its constants manually cause they will be overwritten.
*
* @author pesse
*/
public class CliVersionInfo {
private static final String MAVEN_PROJECT_NAME = "utPLSQL-cli";
private static String MAVEN_PROJECT_VERSION = "unknown";
static {
try {
try (InputStream in = JavaApiVersionInfo.class.getClassLoader().getResourceAsStream("utplsql-cli.version");
BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {
MAVEN_PROJECT_VERSION = reader.readLine();
}
} catch (IOException e) {
System.out.println("WARNING: Could not get Version information!");
}
}
public static String getVersion() {
return MAVEN_PROJECT_VERSION;
}
public static String getInfo() {
return MAVEN_PROJECT_NAME + " " + getVersion();
}
}