From 6e8aa339c5f5f4df05b3bc2a31ddc8d3019e142f Mon Sep 17 00:00:00 2001 From: Tangb Date: Mon, 19 Apr 2021 17:59:56 +0200 Subject: [PATCH] Update ci scripts --- scripts/build-linux64-circleci.sh | 44 ++++++++++++++++--------------- scripts/build-windows64.bat | 1 + 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/scripts/build-linux64-circleci.sh b/scripts/build-linux64-circleci.sh index fdc2458..9709f7c 100755 --- a/scripts/build-linux64-circleci.sh +++ b/scripts/build-linux64-circleci.sh @@ -4,8 +4,8 @@ CLEEPDESKTOPPATH=packaging/cleepdesktop_tree # clear previous process -/bin/rm -rf dist/ -/bin/rm -rf packaging/ +rm -rf dist/ +rm -rf packaging/ # create dirs /bin/mkdir -p "$CLEEPDESKTOPPATH" @@ -24,7 +24,7 @@ python3 get-pip.py echo echo " -> tools versions:" python3 --version -pip3 --version +python3 -m pip --version echo "Node" `node --version` echo "Npm" `npm --version` @@ -33,18 +33,20 @@ echo echo echo "Packaging cleepdesktopcore..." echo "-----------------------------" -pip3 install -r requirements.txt -/bin/cp config/cleepdesktopcore-linux64.spec cleepdesktopcore-linux64.spec -pyinstaller --workpath packaging --clean --noconfirm --noupx --debug all --log-level INFO cleepdesktopcore-linux64.spec -/bin/rm cleepdesktopcore-linux64.spec -/bin/mv dist/cleepdesktopcore "$CLEEPDESKTOPPATH" +python3 -m pip install -r requirements.txt +cp config/cleepdesktopcore-linux64.spec cleepdesktopcore-linux64.spec +python3 -m PyInstaller --workpath packaging --clean --noconfirm --noupx --debug all --log-level INFO cleepdesktopcore-linux64.spec +rm cleepdesktopcore-linux64.spec +echo "Generated files:" +ls -l dist/cleepdesktopcore +mv dist/cleepdesktopcore "$CLEEPDESKTOPPATH" # electron echo echo echo "Building electron app..." echo "------------------------" -/usr/bin/npm ci +npm ci node_modules/.bin/tsc --outDir "$CLEEPDESKTOPPATH" echo "Done" @@ -53,11 +55,11 @@ echo echo echo "Copying release files..." echo "------------------------" -/bin/cp -a html "$CLEEPDESKTOPPATH" -/bin/cp -a resources "$CLEEPDESKTOPPATH" -/bin/cp -a LICENSE.txt "$CLEEPDESKTOPPATH" -/bin/cp -a package.json "$CLEEPDESKTOPPATH" -/bin/cp -a README.md "$CLEEPDESKTOPPATH" +cp -a html "$CLEEPDESKTOPPATH" +cp -a resources "$CLEEPDESKTOPPATH" +cp -a LICENSE.txt "$CLEEPDESKTOPPATH" +cp -a package.json "$CLEEPDESKTOPPATH" +cp -a README.md "$CLEEPDESKTOPPATH" echo "Done" # electron-builder @@ -79,13 +81,13 @@ echo echo echo "Finalizing..." echo "-------------" -/bin/sleep 1 -/bin/mv "./$CLEEPDESKTOPPATH/dist" . -/bin/rm -rf packaging -/bin/rm -rf __pycache__ -/bin/rm -rf core/__pycache__ -/bin/rm -rf core/libs/__pycache__ -/bin/rm -rf core/modules/__pycache__ +sleep 1 +mv "./$CLEEPDESKTOPPATH/dist" . +rm -rf packaging +rm -rf __pycache__ +rm -rf core/__pycache__ +rm -rf core/libs/__pycache__ +rm -rf core/modules/__pycache__ echo "Done" echo diff --git a/scripts/build-windows64.bat b/scripts/build-windows64.bat index 5774262..11fb910 100644 --- a/scripts/build-windows64.bat +++ b/scripts/build-windows64.bat @@ -19,6 +19,7 @@ py -3 -m pip freeze xcopy /q /y config\cleepdesktopcore-windows64.spec . py -3 -m PyInstaller --workpath packaging --clean --noconfirm --noupx --windowed --debug all --log-level INFO cleepdesktopcore-windows64.spec del /q cleepdesktopcore-windows64.spec +echo Generated files: dir dist\cleepdesktopcore move dist\cleepdesktopcore %CLEEPDESKTOPPATH% :: 2021-04-01 WORKAROUND: fix with pyzmq that moves libs from different place. Wait for new pyinstaller release (>2021.1)