tools/release: Fix GPG support
This commit is contained in:
@@ -236,6 +236,8 @@ if(BUILD_JAVA)
|
||||
option(UNIVERSAL_JAVA_PACKAGE "Build a Java multi OS Package" OFF)
|
||||
message(STATUS "Java: Create multiple os package: ${UNIVERSAL_JAVA_PACKAGE}")
|
||||
|
||||
# On Centos-7 this option (needed otherwise) is unrecognized and should be
|
||||
# replaced by an empty string.
|
||||
set(GPG_ARGS "<arg>--pinentry-mode</arg><arg>loopback</arg>" CACHE STRING "Extra options for GPG")
|
||||
message(STATUS "Java: Add GPG options: ${GPG_ARGS}")
|
||||
endif()
|
||||
|
||||
@@ -161,7 +161,15 @@ function build_java() {
|
||||
echo "DONE" | tee -a build.log
|
||||
|
||||
echo -n "Build Java..." | tee -a build.log
|
||||
cmake -S. -Btemp_java -DBUILD_SAMPLES=OFF -DBUILD_EXAMPLES=OFF -DBUILD_JAVA=ON -DSKIP_GPG=OFF
|
||||
|
||||
if [[ ! -v GPG_ARGS ]]; then
|
||||
GPG_EXTRA=""
|
||||
else
|
||||
GPG_EXTRA="-DGPG_ARGS=${GPG_ARGS}"
|
||||
fi
|
||||
|
||||
cmake -S. -Btemp_java -DBUILD_SAMPLES=OFF -DBUILD_EXAMPLES=OFF \
|
||||
-DBUILD_JAVA=ON -DSKIP_GPG=OFF ${GPG_EXTRA}
|
||||
cmake --build temp_java -j8 -v
|
||||
echo "DONE" | tee -a build.log
|
||||
#cmake --build temp_java --target test
|
||||
|
||||
@@ -79,8 +79,22 @@ function build_delivery() {
|
||||
|
||||
cd "${RELEASE_DIR}" || exit 2
|
||||
|
||||
# Build env
|
||||
docker build --tag ortools/linux_delivery:env \
|
||||
--build-arg ORTOOLS_GIT_BRANCH="${ORTOOLS_BRANCH}" \
|
||||
--build-arg ORTOOLS_GIT_SHA1="${ORTOOLS_SHA1}" \
|
||||
--target=env \
|
||||
-f Dockerfile .
|
||||
|
||||
# Build devel
|
||||
docker build --tag ortools/linux_delivery:devel \
|
||||
--build-arg ORTOOLS_GIT_BRANCH="${ORTOOLS_BRANCH}" \
|
||||
--build-arg ORTOOLS_GIT_SHA1="${ORTOOLS_SHA1}" \
|
||||
--target=devel \
|
||||
-f Dockerfile .
|
||||
|
||||
# Build delivery
|
||||
docker build --tag ortools:linux_delivery \
|
||||
docker build --tag ortools/linux_delivery:"${ORTOOLS_DELIVERY}" \
|
||||
--build-arg ORTOOLS_GIT_BRANCH="${ORTOOLS_BRANCH}" \
|
||||
--build-arg ORTOOLS_GIT_SHA1="${ORTOOLS_SHA1}" \
|
||||
--build-arg ORTOOLS_TOKEN="${ORTOOLS_TOKEN}" \
|
||||
@@ -101,8 +115,7 @@ function build_dotnet() {
|
||||
docker run --rm --init \
|
||||
-w /root/or-tools \
|
||||
-v "${ROOT_DIR}/export":/export \
|
||||
ortools:linux_delivery /bin/bash -c \
|
||||
"cp export/*nupkg /export/"
|
||||
-t ortools/linux_delivery:dotnet "cp export/*nupkg /export/"
|
||||
}
|
||||
|
||||
# Java build
|
||||
@@ -113,8 +126,7 @@ function build_java() {
|
||||
docker run --rm --init \
|
||||
-w /root/or-tools \
|
||||
-v "${ROOT_DIR}/export":/export \
|
||||
ortools:linux_delivery /bin/bash -c \
|
||||
"cp export/*.jar* /export/"
|
||||
-t ortools/linux_delivery:java "cp export/*.jar* /export/"
|
||||
}
|
||||
|
||||
function build_archive() {
|
||||
|
||||
Reference in New Issue
Block a user