Browse Source

CI: Pack lib binaries into zip and tar release

Stefan Profanter 5 years ago
parent
commit
e9445c4017
2 changed files with 15 additions and 6 deletions
  1. 7 5
      tools/travis/travis_linux_script.sh
  2. 8 1
      tools/travis/travis_push_release.sh

+ 7 - 5
tools/travis/travis_linux_script.sh

@@ -133,7 +133,8 @@ else
         cmake -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/Toolchain-mingw32.cmake -DUA_ENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DUA_BUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON ..
         make -j
         if [ $? -ne 0 ] ; then exit 1 ; fi
-        zip -r open62541-win32.zip ../../doc_latex/open62541.pdf ../LICENSE ../AUTHORS ../README.md ./bin/examples/server_ctt.exe ./bin/examples/client.exe ./bin/libopen62541.* open62541.h open62541.c
+        cp ../LICENSE ../AUTHORS ../README.md .
+        zip -r open62541-win32.zip ../../doc_latex/open62541.pdf LICENSE AUTHORS README.md ./bin/examples/server_ctt.exe ./bin/examples/client.exe ./bin/libopen62541.* open62541.h open62541.c
         cp open62541-win32.zip ..
         cd .. && rm build -rf
         echo -en 'travis_fold:end:script.build.cross_mingw32\\r'
@@ -143,7 +144,8 @@ else
         cmake -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/Toolchain-mingw64.cmake -DUA_ENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DUA_BUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON ..
         make -j
         if [ $? -ne 0 ] ; then exit 1 ; fi
-        zip -r open62541-win64.zip ../../doc_latex/open62541.pdf ../LICENSE ../AUTHORS ../README.md ./bin/examples/server_ctt.exe ./bin/examples/client.exe ./bin/libopen62541.* open62541.h open62541.c
+        cp ../LICENSE ../AUTHORS ../README.md .
+        zip -r open62541-win64.zip ../../doc_latex/open62541.pdf LICENSE AUTHORS README.md ./bin/examples/server_ctt.exe ./bin/examples/client.exe ./bin/libopen62541.* open62541.h open62541.c
         cp open62541-win64.zip ..
         cd .. && rm build -rf
         echo -en 'travis_fold:end:script.build.cross_mingw64\\r'
@@ -153,7 +155,7 @@ else
         cmake -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/Toolchain-gcc-m32.cmake -DUA_ENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DUA_BUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON ..
         make -j
         if [ $? -ne 0 ] ; then exit 1 ; fi
-        tar -pczf open62541-linux32.tar.gz ../../doc_latex/open62541.pdf ../LICENSE ../AUTHORS ../README.md ./bin/examples/server_ctt ./bin/examples/client ./bin/libopen62541.* open62541.h open62541.c
+        tar -pczf open62541-linux32.tar.gz ../../doc_latex/open62541.pdf ../LICENSE ../AUTHORS ../README.md bin/examples/server_ctt bin/examples/client bin/libopen62541.* open62541.h open62541.c
         cp open62541-linux32.tar.gz ..
         cd .. && rm build -rf
         echo -en 'travis_fold:end:script.build.cross_linux\\r'
@@ -165,7 +167,7 @@ else
         cmake -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/Toolchain-rpi64.cmake -DUA_ENABLE_AMALGAMATION=ON -DCMAKE_BUILD_TYPE=Release -DUA_BUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON ..
         make -j
         if [ $? -ne 0 ] ; then exit 1 ; fi
-        tar -pczf open62541-raspberrypi.tar.gz ../../doc_latex/open62541.pdf ../LICENSE ../AUTHORS ../README.md ./bin/examples/server_ctt ./bin/examples/client ./bin/libopen62541.* open62541.h open62541.c
+        tar -pczf open62541-raspberrypi.tar.gz ../../doc_latex/open62541.pdf ../LICENSE ../AUTHORS ../README.md bin/examples/server_ctt bin/examples/client bin/libopen62541.* open62541.h open62541.c
         cp open62541-raspberrypi.tar.gz ..
         cd .. && rm build -rf
         echo -en 'travis_fold:end:script.build.cross_raspi\\r'
@@ -176,7 +178,7 @@ else
     cmake -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/$PYTHON -DCMAKE_BUILD_TYPE=Release -DUA_ENABLE_AMALGAMATION=ON -DUA_BUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON ..
     make -j
     if [ $? -ne 0 ] ; then exit 1 ; fi
-    tar -pczf open62541-linux64.tar.gz ../../doc_latex/open62541.pdf ../LICENSE ../AUTHORS ../README.md ./bin/examples/server_ctt ./bin/examples/client ./bin/libopen62541.* open62541.h open62541.c
+    tar -pczf open62541-linux64.tar.gz ../../doc_latex/open62541.pdf ../LICENSE ../AUTHORS ../README.md bin/examples/server_ctt bin/examples/client bin/libopen62541.* open62541.h open62541.c
     cp open62541-linux64.tar.gz ..
     cp open62541.h ../.. # copy single file-release
     cp open62541.c ../.. # copy single file-release

+ 8 - 1
tools/travis/travis_push_release.sh

@@ -30,10 +30,17 @@ if [ ! -e "releases/$TAG.zip" ]; then
     cp ../../../open62541.c .
     cp ../../../open62541.h .
     cp ../../../doc_latex/open62541.pdf .
-    zip -r "$TAG.zip" open62541.c open62541.h open62541.pdf
+    cp ./../../README.md .
+    cp ./../../LICENSE .
+    cp ./../../AUTHORS .
+
+    zip -r "$TAG.zip" open62541.c open62541.h open62541.pdf README.md LICENSE AUTHORS
     rm open62541.c
     rm open62541.h
     rm open62541.pdf
+    rm README.md
+    rm LICENSE
+    rm AUTHORS
     git add "$TAG.zip"
 
     echo "$TAG.zip" | cat - raw.txt > temp && mv temp raw.txt