release: Update windows script
This commit is contained in:
@@ -366,6 +366,12 @@ run: build
|
||||
cd $(SOURCE_PROJECT_PATH) && "$(MVN_BIN)" exec:java $(ARGS)
|
||||
endif
|
||||
|
||||
ifneq ($(ORTOOLS_TOKEN),)
|
||||
GPG_SIGN=
|
||||
else
|
||||
GPG_SIGN= -Dgpg.skip=true
|
||||
endif
|
||||
|
||||
###################
|
||||
## Maven package ##
|
||||
###################
|
||||
@@ -402,7 +408,7 @@ ifeq ($(SYSTEM),unix)
|
||||
endif
|
||||
cd $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_NATIVE_PROJECT) && "$(MVN_BIN)" compile -B
|
||||
cd $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_NATIVE_PROJECT) && "$(MVN_BIN)" package -B
|
||||
cd $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_NATIVE_PROJECT) && "$(MVN_BIN)" install -B -Dgpg.skip=true
|
||||
cd $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_NATIVE_PROJECT) && "$(MVN_BIN)" install -B $(GPG_SIGN)
|
||||
$(TOUCH) $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_NATIVE_PROJECT)$Stimestamp
|
||||
|
||||
|
||||
@@ -459,7 +465,7 @@ else
|
||||
endif
|
||||
cd $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_PROJECT) && "$(MVN_BIN)" compile -B
|
||||
cd $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_PROJECT) && "$(MVN_BIN)" package -B
|
||||
cd $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_PROJECT) && "$(MVN_BIN)" install -B -Dgpg.skip=true
|
||||
cd $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_PROJECT) && "$(MVN_BIN)" install -B $(GPG_SIGN)
|
||||
$(TOUCH) $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_PROJECT)$Stimestamp
|
||||
|
||||
#############################
|
||||
|
||||
@@ -93,10 +93,10 @@ 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
|
||||
openssl aes-256-cbc -iter 42 -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
|
||||
openssl aes-256-cbc -iter 42 -pass pass:$ORTOOLS_TOKEN -in tools/release/settings.xml.enc -out ~/.m2/settings.xml -d
|
||||
echo "DONE" | tee -a build.log
|
||||
|
||||
#####################
|
||||
|
||||
@@ -76,10 +76,10 @@ 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
|
||||
openssl aes-256-cbc -iter 42 -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
|
||||
openssl aes-256-cbc -iter 42 -pass pass:$ORTOOLS_TOKEN -in tools/release/settings.xml.enc -out ~/.m2/settings.xml -d
|
||||
echo "DONE" | tee -a build.log
|
||||
|
||||
#####################
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
@echo off
|
||||
REM /!\ THIS SCRIPT SUPPOSE A FIXED PATH FOR PYTHON /!\
|
||||
REM Each blocks could be triggered independently (i.e. commenting others)
|
||||
REM run it as: cmd /c tools\release\build_delivery_win.cmd
|
||||
REM run it as:
|
||||
REM set PATH=%PATH%;tools;tools\win
|
||||
REM cmd /c tools\release\build_delivery_win.cmd
|
||||
|
||||
REM Check all prerequisite
|
||||
REM C++
|
||||
set PATH=%PATH%;tools;tools\win
|
||||
|
||||
make.exe clean_third_party || exit 1
|
||||
make.exe clean || exit 1
|
||||
if "%ORTOOLS_TOKEN%" == "" (
|
||||
echo ORTOOLS_TOKEN: NOT FOUND | tee.exe build.log
|
||||
exit 1
|
||||
)
|
||||
|
||||
REM Print version
|
||||
make.exe print-OR_TOOLS_VERSION | tee.exe build.log
|
||||
|
||||
REM clean everything
|
||||
echo clean everything... | tee.exe -a build.log
|
||||
make.exe clean_third_party || exit 1
|
||||
make.exe clean || exit 1
|
||||
|
||||
which.exe cmake || exit 1
|
||||
which.exe cmake | tee.exe -a build.log
|
||||
REM Python
|
||||
@@ -38,6 +46,13 @@ which.exe java || exit 1
|
||||
which.exe java | tee.exe -a build.log
|
||||
which.exe mvn || exit 1
|
||||
which.exe mvn | tee.exe -a build.log
|
||||
|
||||
which.exe gpg || exit 1
|
||||
which.exe gpg | tee.exe -a build.log
|
||||
which.exe openssl || exit 1
|
||||
which.exe openssl | tee.exe -a build.log
|
||||
|
||||
|
||||
REM .Net
|
||||
which.exe dotnet || exit 1
|
||||
which.exe dotnet | tee.exe -a build.log
|
||||
@@ -64,6 +79,23 @@ echo make third_party: ... | tee.exe -a build.log
|
||||
make.exe third_party WINDOWS_PATH_TO_PYTHON=c:\python39-64 || exit 1
|
||||
echo make third_party: DONE | tee.exe -a build.log
|
||||
|
||||
REM ########################
|
||||
REM ## Install Java gpg ##
|
||||
REM ########################
|
||||
echo Install Java gpg | tee.exe -a build.log
|
||||
openssl aes-256-cbc -iter 42 -pass pass:%ORTOOLS_TOKEN% -in tools\release\private-key.gpg.enc -out private-key.gpg -d
|
||||
gpg --batch --import private-key.gpg
|
||||
mkdir -p %userprofile%/.m2
|
||||
openssl aes-256-cbc -iter 42 -pass pass:%ORTOOLS_TOKEN% -in tools\release\settings.xml.enc -out %userprofile%/.m2/settings.xml -d
|
||||
echo "DONE" | tee -a build.log
|
||||
|
||||
REM ########################
|
||||
REM ## Install .Net snk ##
|
||||
REM ########################
|
||||
echo Install .Net snk | tee.exe -a build.log
|
||||
openssl aes-256-cbc -iter 42 -pass pass:%ORTOOLS_TOKEN% -in tools\release\or-tools.snk.enc -out or-tools.snk -d
|
||||
set DOTNET_SNK=or-tools.snk
|
||||
|
||||
REM ####################
|
||||
REM ## CC/JAVA/.Net ##
|
||||
REM ####################
|
||||
|
||||
@@ -6,6 +6,7 @@ set PATH=%PATH%;C:\python39-64;C:\python39-64\Scripts
|
||||
REM Print version
|
||||
make.exe print-OR_TOOLS_VERSION | tee.exe publish.log
|
||||
|
||||
REM Python
|
||||
which.exe twine || exit 1
|
||||
which.exe twine | tee.exe -a publish.log
|
||||
|
||||
|
||||
Reference in New Issue
Block a user