From de7368cbca616939e9b36329a81d75b8a15a54bb Mon Sep 17 00:00:00 2001 From: "aleksandr.vodianov@demlabs.net" <aleksandr.vodianov@demlabs.net> Date: Thu, 30 Dec 2021 23:15:33 +0300 Subject: [PATCH] fixed deploy --- linux/debian/scripts/compile_and_pack.sh | 4 ++-- linux/debian/scripts/deploy.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/debian/scripts/compile_and_pack.sh b/linux/debian/scripts/compile_and_pack.sh index 37c9e74..cf0e89d 100755 --- a/linux/debian/scripts/compile_and_pack.sh +++ b/linux/debian/scripts/compile_and_pack.sh @@ -48,7 +48,7 @@ substitute_pkgname_postfix && mkdir -p build && cd build && ${CMAKE_PATH}cmake . && ${CMAKE_PATH}cmake -DCMAKE_BUILD_TYPE=Debug ../ && make -j$(nproc) && ${CMAKE_PATH}cpack && repack *.deb && mv -v *.deb ../packages/ && rm -r * || error=$? echo $error -if [[ $(echo $DISTR_CODENAME| grep bullseye) != "" && $error == 0 ]]; then +if [[ $(echo $DISTR_CODENAME | grep bullseye) != "" && $error == 0 ]]; then export LD_LIBRARY_PATH=$LD_LIBRARY_PATH_ARM64 ${CMAKE_PATH}cmake -DCMAKE_C_COMPILER=$ARM64_C_COMPILER -DCMAKE_CXX_COMPLIER=$ARM64_CXX_COMPILER -DCMAKE_TARGET_ARCH="arm64" .. && make -j$(nproc) && \ ${CMAKE_PATH}cpack && repack *.deb && mv -v *.deb ../packages/ && rm -r * && \ @@ -60,7 +60,7 @@ if [[ $(echo $DISTR_CODENAME| grep bullseye) != "" && $error == 0 ]]; then unset LD_LIBRARY_PATH fi -if [[ $(echo $BUILD_TYPE | grep buster) != "" && $error == 0 ]]; then +if [[ $(echo $DISTR_CODENAME | grep buster) != "" && $error == 0 ]]; then sed -ibak 's/#set(BUILD_WITH_GDB_DRIVER_PGSQL ON)/set(BUILD_WITH_GDB_DRIVER_PGSQL ON)/' ../CMakeLists.txt || error=$? ${CMAKE_PATH}cmake ../ && make -j$(nproc) && ${CMAKE_PATH}cpack && repack *.deb && mv -v *.deb ../packages/ && rm -r * \ && ${CMAKE_PATH}cmake -DCMAKE_BUILD_TYPE=Debug ../ && make -j$(nproc) && ${CMAKE_PATH}cpack && repack *.deb && mv -v *.deb ../packages/ && rm -r * || error=$? diff --git a/linux/debian/scripts/deploy.sh b/linux/debian/scripts/deploy.sh index 23ce972..48561f1 100755 --- a/linux/debian/scripts/deploy.sh +++ b/linux/debian/scripts/deploy.sh @@ -39,7 +39,7 @@ for pkgfile in $PKGFILES; do echo "REF_NAME is $CI_COMMIT_REF_NAME" ssh -i $CELLFRAME_REPO_KEY "$CELLFRAME_FILESERVER_CREDS" "mkdir -p $CELLFRAME_FILESERVER_PATH/$SUBDIR" scp -i $CELLFRAME_REPO_KEY $wd/$PACKAGE_PATH/$pkgname.deb "$CELLFRAME_FILESERVER_CREDS:$CELLFRAME_FILESERVER_PATH/$SUBDIR/$pkgname_public.deb" - if [[ $(echo $pkgname | grep "dbg") == "" ]]; then + if [[ $CI_COMMIT_REF_NAME == "master" && $(echo $pkgname | grep "dbg") == "" ]]; then scp -r -i $CELLFRAME_REPO_KEY ../prod_build/general/essentials/$pkgname_weblink "$CELLFRAME_FILESERVER_CREDS:$CELLFRAME_FILESERVER_PATH/$SUBDIR/" scp -P $REPO_PORT -i $CELLFRAME_REPO_KEY $wd/$PACKAGE_PATH/$pkgname.deb "$CELLFRAME_REPO_CREDS:~/aptly/repo_update/$pkgname_public.deb" ssh -p $REPO_PORT -i $CELLFRAME_REPO_KEY "$CELLFRAME_REPO_CREDS" -- "~/aptly/repo_update.sh" -- GitLab