generated from adempiere/adempiere-grpc-template-service
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a97110f
commit 36813bc
Showing
8 changed files
with
238 additions
and
33 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
Binary file modified
BIN
+6.88 KB
(110%)
docker-compose/envoy/definitions/adempiere-processors-service.dsc
Binary file not shown.
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,94 @@ | ||
/************************************************************************************ | ||
* Copyright (C) 2018-present E.R.P. Consultores y Asociados, C.A. * | ||
* Contributor(s): Edwin Betancourt, [email protected] * | ||
* This program is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* You should have received a copy of the GNU General Public License * | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. * | ||
************************************************************************************/ | ||
|
||
package org.spin.base; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.sql.Date; | ||
import java.text.SimpleDateFormat; | ||
import java.util.Properties; | ||
|
||
import org.compiere.util.CLogger; | ||
|
||
/** | ||
* @author Edwin Betancourt, [email protected], https://github.com/EdwinBetanc0urt | ||
* Service for backend of Version | ||
*/ | ||
public final class Version | ||
{ | ||
|
||
private static CLogger log = CLogger.getCLogger(Version.class); | ||
|
||
/** Main Version String */ | ||
// Conventions for naming second number is even for stable, and odd for unstable | ||
// the releases will have a suffix (a) for alpha - (b) for beta - (t) for trunk - (s) for stable - and (LTS) for long term support | ||
public static String MAIN_VERSION = "1.0.0-dev"; | ||
|
||
/** Detail Version as date Used for Client/Server */ | ||
public static String DATE_VERSION = (new SimpleDateFormat("yyyy-MM-dd")).format( | ||
new Date( | ||
System.currentTimeMillis() | ||
) | ||
); | ||
|
||
public static String IMPLEMENTATION_VERSION = "1.0.0-dev"; | ||
|
||
static { | ||
ClassLoader loader = Version.class.getClassLoader(); | ||
InputStream inputStream = loader.getResourceAsStream("org/spin/base/version.properties"); | ||
if (inputStream != null) { | ||
Properties properties = new Properties(); | ||
try { | ||
properties.load(inputStream); | ||
|
||
if (properties.containsKey("MAIN_VERSION")) { | ||
MAIN_VERSION = properties.getProperty("MAIN_VERSION"); | ||
} | ||
if (properties.containsKey("DATE_VERSION")) { | ||
DATE_VERSION = properties.getProperty("DATE_VERSION"); | ||
} | ||
if (properties.containsKey("IMPLEMENTATION_VERSION")) { | ||
IMPLEMENTATION_VERSION = properties.getProperty("IMPLEMENTATION_VERSION"); | ||
} | ||
} catch (IOException e) { | ||
// file does not exists | ||
log.warning("File version.properties does no exists"); | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* Get Product Version | ||
* @return Application Version | ||
*/ | ||
public static String getVersion() | ||
{ | ||
return MAIN_VERSION + " @ " + DATE_VERSION; | ||
} // getVersion | ||
|
||
public static String getMainVersion() { | ||
return MAIN_VERSION; | ||
} | ||
|
||
public static String getDateVersion() { | ||
return DATE_VERSION; | ||
} | ||
|
||
public static String getImplementationVersion() { | ||
return IMPLEMENTATION_VERSION; | ||
} | ||
|
||
} // Adempiere |
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
Oops, something went wrong.