Skip to content

Commit

Permalink
Updated build scripts for latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezrafla committed Apr 3, 2020
1 parent 866a4e4 commit 2d5c9d5
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 19 deletions.
30 changes: 19 additions & 11 deletions build-docker.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
#!/bin/bash
CONTAINER=onlyoffice-document-server
LOCATION=/var/www/onlyoffice/documentserver/sdkjs
LOCATION=/var/www/onlyoffice/documentserver/

cd build
grunt --level=WHITESPACE_ONLY --formatting=PRETTY_PRINT
cd ../deploy/sdkjs/
sudo docker exec $CONTAINER /bin/bash -c "cd $LOCATION && find . -type f -name '*.gz' -delete"
sudo docker cp word/sdk-all.js $CONTAINER:$LOCATION/word
sudo docker cp word/sdk-all-min.js $CONTAINER:$LOCATION/word
sudo docker cp slide/sdk-all.js $CONTAINER:$LOCATION/slide
sudo docker cp slide/sdk-all-min.js $CONTAINER:$LOCATION/slide
sudo docker cp cell/sdk-all.js $CONTAINER:$LOCATION/cell
sudo docker cp cell/sdk-all-min.js $CONTAINER:$LOCATION/cell
sudo docker cp common $CONTAINER:$LOCATION
if [ -z "$NOBUILD" ]
then
if [ -z "$PRODUCTION" ]
then
grunt --level=WHITESPACE_ONLY --formatting=PRETTY_PRINT
else
echo "Production build"
grunt --level=ADVANCED
fi
fi

cd ../deploy/
# sudo docker exec onlyoffice-document-server /bin/bash -c "sudo rm -rf $LOCATION/sdkjs"
sudo docker cp sdkjs $CONTAINER:$LOCATION

# restart document-server
sudo docker exec onlyoffice-document-server supervisorctl restart all
39 changes: 31 additions & 8 deletions build-remote.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
#!/bin/bash
KEY=~/.ssh/ec2.pem
[email protected]:/var/www/onlyoffice/documentserver/
export PRODUCT_VERSION="15.2.0"
export BUILD_NUMBER="111"
cd build
grunt --level=ADVANCED
cd ..
cd deploy/
scp -i $KEY -r sdkjs $SERVER
LOCATION=/var/www/onlyoffice/documentserver
if [ -z "$DEV" ]
then
[email protected]
else
[email protected]
fi

echo "Server: $SERVER"

if [ -z "$NOBUILD" ]
then
echo "-- Building"
export PRODUCT_VERSION="15.5.0"
export BUILD_NUMBER="111"
export PUBLISHER_URL="https://www.zegenie.com"
cd build
grunt --level=ADVANCED
cd ..
fi

if [ -z "$NOPUSH" ]
then
echo "-- Pushing to server"
cd deploy/
rm -f sdkjs.tgz > /dev/null
tar cz sdkjs.tgz sdkjs
scp -i $KEY sdkjs.tgz $SERVER:$LOCATION
ssh -i $KEY $SERVER "cd $LOCATION && sudo chown ubuntu:ubuntu -R sdkjs && tar xvf sdkjs.tgz"
rm -f sdkjs.tgz > /dev/null
fi

0 comments on commit 2d5c9d5

Please sign in to comment.