Skip to content

Commit

Permalink
Update ci scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tangb committed Apr 19, 2021
1 parent 7823bda commit 6e8aa33
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
44 changes: 23 additions & 21 deletions scripts/build-linux64-circleci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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`

Expand All @@ -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"

Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/build-windows64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6e8aa33

Please sign in to comment.