From dee1e6eacca601c12f3e81cdeb966fd79c8e2f82 Mon Sep 17 00:00:00 2001 From: idk Date: Thu, 16 Feb 2023 18:51:38 +0000 Subject: [PATCH] automatically set I2P_RELEASE_VERSION --- build.sh | 13 ++++++++++++- config.example.sh | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 0edd4a6..2e7df17 100755 --- a/build.sh +++ b/build.sh @@ -4,6 +4,17 @@ set -e if [ -z "$I2P_VERSION" ]; then I2P_VERSION="i2p-2.1.0" fi + +if [ $(echo "$I2P_VERSION" | grep -q '.\..\..') ]; then + if [ -z "$I2P_RELEASE_VERSION" ]; then + I2P_RELEASE_VERSION="$I2P_VERSION" + fi +else + if [ -z "$I2P_RELEASE_VERSION" ]; then + I2P_RELEASE_VERSION=2.1.0 + fi +fi + if [ -z "$I2P_BUILD_NUMBER" ]; then I2P_BUILD_NUMBER=1 fi @@ -186,7 +197,7 @@ echo "signing the bundle" # --verbose=4 \ # I2P.app -jpackage --name I2P --app-image I2P.app --app-version "$I2P_VERSION" \ +jpackage --name I2P --app-image I2P.app --app-version "$I2P_RELEASE_VERSION" \ --verbose --temp tmp \ --license-file build/LICENSE.txt \ --mac-sign \ diff --git a/config.example.sh b/config.example.sh index c14f1ad..9e6a827 100644 --- a/config.example.sh +++ b/config.example.sh @@ -10,6 +10,8 @@ # Uncomment/Edit this line to include the version number in the config file # I2P_VERSION=i2p-2.1.0 +# Uncomment/Edit this line to change the version number that you pass to jpackage +# I2P_RELEASE_VERSION=2.1.0 # Uncomment/Edit this line to include the build number in the config file # I2P_BUILD_NUMBER=1