deployment update

This commit is contained in:
tmshv committed 2016-03-26 01:46:27 +03:00
1 parent 427de393ed
commit 8a0074cbf9
3 files changed
+23 -10

No files matched your search

+9 -6
View File
@@ -2,33 +2,36 @@
echo "Deploying art.shburg.org"
NODE_ENV=production gulp deploy
server="art.shburg.org"
tarfile="build.tar.gz"
tarpath=$TMPDIR${tarfile}
destpath="~/www/art.shburg.org"
echo "Packing..."
echo "Building..."
npm run out
NODE_ENV=production gulp deploy
echo "Packing $tarpath"
env GZIP=-9 tar -czf ${tarpath} \
--disable-copyfile \
--exclude=node_modules \
--exclude=.git \
--exclude=.idea \
--exclude=.DS_Store \
--exclude=src \
--exclude=deploy.sh \
--exclude=install.sh \
.
echo "Build file: $tarpath"
echo "Uploading..."
#ssh h "rm -rf $destpath/*"
ssh h "rm -rf $destpath/public/*"
scp ${tarpath} hoster@${server}:${destpath}
echo "Build file successfully uploaded on server"
echo "Installing..."
ssh hoster@${server} "bash -s" -- < ./install.sh ${destpath} ${tarfile}
echo "Clear..."
rm ${tarpath}
echo "Done"