Update build_success.sh and setup_variables.sh

This commit is contained in:
Andrea Cavalli 2020-08-20 11:00:45 +02:00
parent 0e0c2d2737
commit c2bc43a72d
2 changed files with 15 additions and 13 deletions

View File

@ -6,10 +6,10 @@ source ./travis/setup_variables.sh
# ====== Copy build output
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mv $TDNATIVES_BIN_DIR/libtdjni.so $TRAVIS_BUILD_DIR/out/libtdjni.so
mv $TDNATIVES_BIN_DIR/$SRC_TDJNI_LIBNAME $TRAVIS_BUILD_DIR/out/$DEST_TDJNI_LIBNAME
mv $TDNATIVES_DOCS_BIN_DIR $TRAVIS_BUILD_DIR/out/docs
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
mv $TDNATIVES_BIN_DIR/tdjni.dll $TRAVIS_BUILD_DIR/out/libtdjni.dll
mv $TDNATIVES_BIN_DIR/$SRC_TDJNI_LIBNAME $TRAVIS_BUILD_DIR/out/$DEST_TDJNI_LIBNAME
fi
# ====== Deploy phase
@ -31,7 +31,9 @@ cd $TRAVIS_BUILD_DIR
git clone --depth=1 "git@ssh.git.ignuranza.net:tdlight-team/tdlight-java-natives-$TRAVIS_OS_NAME_STANDARD-$TRAVIS_CPU_ARCH_STANDARD.git"
cd "tdlight-java-natives-$TRAVIS_OS_NAME_STANDARD-$TRAVIS_CPU_ARCH_STANDARD"
mkdir -p "src/main/resources/libs/$TRAVIS_OS_NAME_SHORT/$TRAVIS_CPU_ARCH_STANDARD"
mv "$TRAVIS_BUILD_DIR/out/$SRC_TDJNI_LIBNAME" "src/main/resources/libs/$TRAVIS_OS_NAME_SHORT/$TRAVIS_CPU_ARCH_STANDARD/$DEST_TDJNI_LIBNAME"
# Add the folder to git if not added
git add "src/main/resources/libs/$TRAVIS_OS_NAME_SHORT/$TRAVIS_CPU_ARCH_STANDARD"
mv "$TRAVIS_BUILD_DIR/out/$DEST_TDJNI_LIBNAME" "src/main/resources/libs/$TRAVIS_OS_NAME_SHORT/$TRAVIS_CPU_ARCH_STANDARD/$DEST_TDJNI_LIBNAME"
# IF THE NATIVE LIBRARY IS CHANGED
if [[ ! -z "$(git status --porcelain | grep "src/main/resources/libs/$TRAVIS_OS_NAME_SHORT/$TRAVIS_CPU_ARCH_STANDARD/$DEST_TDJNI_LIBNAME")" ]]; then

View File

@ -2,15 +2,15 @@
set -e
# ====== Variables
export TD_SRC_DIR=${PWD}/dependencies/tdlight
export TD_BIN_DIR=${PWD}/bin-td
export TDNATIVES_BIN_DIR=${PWD}/bin-tdlib
export TDNATIVES_CPP_SRC_DIR=${PWD}/src/tdlib-cpp
export TDNATIVES_DOCS_BIN_DIR=${PWD}/bin-docs
export TD_BUILD_DIR=${PWD}/build-td
export TDNATIVES_CPP_BUILD_DIR=${PWD}/build-tdlib
export JAVA_SRC_DIR=${PWD}/src/tdlib-java
export TDLIB_SERIALIZER_DIR=${PWD}/dependencies/tdlib-serializer
export TD_SRC_DIR=$TRAVIS_BUILD_DIR/dependencies/tdlight
export TD_BIN_DIR=$TRAVIS_BUILD_DIR/bin-td
export TDNATIVES_BIN_DIR=$TRAVIS_BUILD_DIR/bin-tdlib
export TDNATIVES_CPP_SRC_DIR=$TRAVIS_BUILD_DIR/src/tdlib-cpp
export TDNATIVES_DOCS_BIN_DIR=$TRAVIS_BUILD_DIR/bin-docs
export TD_BUILD_DIR=$TRAVIS_BUILD_DIR/build-td
export TDNATIVES_CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/build-tdlib
export JAVA_SRC_DIR=$TRAVIS_BUILD_DIR/src/tdlib-java
export TDLIB_SERIALIZER_DIR=$TRAVIS_BUILD_DIR/dependencies/tdlib-serializer
export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/javax.crypto=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED"
export TRAVIS_CPU_ARCH_JAVA="${TRAVIS_CPU_ARCH,,}"
if [ "$TRAVIS_CPU_ARCH" = "arm64" ]; then
@ -27,7 +27,7 @@ else
export TRAVIS_OS_NAME_SHORT=$TRAVIS_OS_NAME_STANDARD
fi
if [ "$TRAVIS_OS_NAME_STANDARD" = "windows" ]; then
export SRC_TDJNI_LIBNAME="libtdjni.dll"
export SRC_TDJNI_LIBNAME="tdjni.dll"
export DEST_TDJNI_LIBNAME="tdjni.dll"
else
export SRC_TDJNI_LIBNAME="libtdjni.so"