diff --git a/tools/release/build_delivery_mac.sh b/tools/release/build_delivery_mac.sh index 732beb42a3..78da3cb40b 100755 --- a/tools/release/build_delivery_mac.sh +++ b/tools/release/build_delivery_mac.sh @@ -6,6 +6,11 @@ if [[ -z "${DOTNET_SNK}" ]]; then exit 1 fi +if [[ -z "${ORTOOLS_TOKEN}" ]]; then + echo "ORTOOLS_TOKEN: not found !" | tee build.log + exit 1 +fi + # Clean everything make clean make clean_third_party @@ -52,8 +57,13 @@ else command -v mvn | xargs echo "mvn: " | tee -a build.log java -version 2>&1 | head -n 1 | grep 1.8 fi +# Maven central need gpg sign and we store the release key encoded using openssl +command -v openssl +command -v openssl | xargs echo "openssl: " | tee -a build.log +command -v gpg +command -v gpg | xargs echo "gpg: " | tee -a build.log -# C# +#.Net command -v dotnet command -v dotnet | xargs echo "dotnet: " | tee -a build.log @@ -79,6 +89,16 @@ echo -n "Build Third Party..." | tee -a build.log make third_party UNIX_PYTHON_VER=3.9 echo "DONE" | tee -a build.log +######################## +## Install Java gpg ## +######################## +echo -n "Install Java gpg" | tee -a build.log +openssl aes-256-cbc -pass pass:$ORTOOLS_TOKEN -in tools/release/private-key.gpg.enc -out private-key.gpg -d +gpg --batch --import private-key.gpg +mkdir -p ~/.m2 +openssl aes-256-cbc -pass pass:$ORTOOLS_TOKEN -in tools/release/settings.xml.enc -out ~/.m2/settings.xml -d +echo "DONE" | tee -a build.log + ##################### ## C++/Java/.Net ## ##################### diff --git a/tools/release/build_delivery_unix.sh b/tools/release/build_delivery_unix.sh index 9f1c594aff..726210e7f7 100755 --- a/tools/release/build_delivery_unix.sh +++ b/tools/release/build_delivery_unix.sh @@ -6,6 +6,11 @@ if [[ -z "${DOTNET_SNK}" ]]; then exit 1 fi +if [[ -z "${ORTOOLS_TOKEN}" ]]; then + echo "ORTOOLS_TOKEN: not found !" | tee build.log + exit 1 +fi + # Clean everything make clean make clean_third_party @@ -18,6 +23,7 @@ make print-OR_TOOLS_VERSION | tee build.log command -v gcc | xargs echo "gcc: " | tee -a build.log command -v cmake | xargs echo "cmake: " | tee -a build.log command -v make | xargs echo "make: " | tee -a build.log + command -v swig | xargs echo "swig: " | tee -a build.log # python @@ -35,8 +41,13 @@ else command -v jar | xargs echo "jar: " | tee -a build.log command -v mvn | xargs echo "mvn: " | tee -a build.log fi +# Maven central need gpg sign and we store the release key encoded using openssl +command -v openssl +command -v openssl | xargs echo "openssl: " | tee -a build.log +command -v gpg +command -v gpg | xargs echo "gpg: " | tee -a build.log -# dotnet +# .Net command -v dotnet | xargs echo "dotnet: " | tee -a build.log ############################### @@ -61,6 +72,16 @@ echo -n "Build Third Party..." | tee -a build.log make third_party UNIX_PYTHON_VER=3 echo "DONE" | tee -a build.log +######################## +## Install Java gpg ## +######################## +echo -n "Install Java gpg" | tee -a build.log +openssl aes-256-cbc -pass pass:$ORTOOLS_TOKEN -in tools/release/private-key.gpg.enc -out private-key.gpg -d +gpg --batch --import private-key.gpg +mkdir -p ~/.m2 +openssl aes-256-cbc -pass pass:$ORTOOLS_TOKEN -in tools/release/settings.xml.enc -out ~/.m2/settings.xml -d +echo "DONE" | tee -a build.log + ##################### ## C++/Java/.Net ## ##################### diff --git a/tools/release/or-tools.snk.enc b/tools/release/or-tools.snk.enc new file mode 100644 index 0000000000..d1465cdde4 Binary files /dev/null and b/tools/release/or-tools.snk.enc differ diff --git a/tools/release/private-key.gpg.enc b/tools/release/private-key.gpg.enc new file mode 100644 index 0000000000..71f0d8e03c Binary files /dev/null and b/tools/release/private-key.gpg.enc differ diff --git a/tools/release/settings.xml.enc b/tools/release/settings.xml.enc new file mode 100644 index 0000000000..60750bbb97 Binary files /dev/null and b/tools/release/settings.xml.enc differ