Skip to content

Commit

Permalink
Try to make release sizes smaller by deleting phantomjs.
Browse files Browse the repository at this point in the history
Thanks to xet7 !
  • Loading branch information
xet7 committed Aug 7, 2019
1 parent 972e7a9 commit 1fc3a1d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ RUN \
#cd /home/wekan/app_build/bundle/programs/server/npm/node_modules/meteor/npm-bcrypt && \
#gosu wekan:wekan rm -rf node_modules/bcrypt && \
#gosu wekan:wekan npm install bcrypt && \
#
# Delete phantomjs
cd /home/wekan/app_build/bundle && \
find . -name "*phantomjs*" | xargs rm -rf && \
#
cd /home/wekan/app_build/bundle/programs/server/ && \
gosu wekan:wekan npm install && \
#gosu wekan:wekan npm install bcrypt && \
Expand Down
3 changes: 3 additions & 0 deletions releases/delete-phantomjs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd ~/repos/wekan/.build
find . -name "*phantomjs*" | xargs rm -rf
cd ~/repos/wekan
7 changes: 7 additions & 0 deletions releases/release-bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cd ~/repos/wekan
./rebuild-wekan.sh
./releases/delete-phantomjs.sh
cd ~/repos/wekan/.build
zip -r wekan-$1.zip bundle
scp wekan-$1.zip x2:/var/snap/wekan/common/releases.wekan.team/
cd ..
3 changes: 3 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ parts:
meteor npm install --allow-superuser
meteor build .build --directory --allow-superuser
cp -f fix-download-unicode/cfs_access-point.txt .build/bundle/programs/server/packages/cfs_access-point.js
cd .build
find . -name "*phantomjs*" | xargs rm -rf
cd ..
#Removed binary version of bcrypt because of security vulnerability that is not fixed yet.
#https://github.com/wekan/wekan/commit/4b2010213907c61b0e0482ab55abb06f6a668eac
#https://github.com/wekan/wekan/commit/7eeabf14be3c63fae2226e561ef8a0c1390c8d3c
Expand Down
4 changes: 4 additions & 0 deletions stacksmith/user-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,8 @@ sudo rm /home/wekan/app_build/bundle/programs/server/npm/node_modules/meteor/raj
cd /home/wekan/app_build/bundle/programs/server/
sudo npm install
sudo chown -R wekan:wekan ./node_modules

cd /home/wekan/app_build/bundle
find . -name "*phantomjs*" | sudo xargs rm -rf

sudo mv /home/wekan/app_build/bundle /build

0 comments on commit 1fc3a1d

Please sign in to comment.