File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,12 @@ export CUR_DEPLOY=$(git rev-parse --verify HEAD)
4
4
mkdir -p $HOME /.bundles
5
5
export DEPLOY_DIR=$HOME /.bundles/$APP -$CUR_DEPLOY
6
6
export BUILD_OUTPUT_FILE=$HOME /.meteor_build_output.txt
7
- [ -f $DEPLOY_DIR .tar.gz ] || \
7
+ if ! [ -f " $DEPLOY_DIR .tar.gz" ] ; then
8
8
meteor build --directory $DEPLOY_DIR > $BUILD_OUTPUT_FILE && \
9
+ cd $DEPLOY_DIR /bundle/programs/server && \
10
+ npm install fibers > $BUILD_OUTPUT_FILE && \
11
+ npm install > $BUILD_OUTPUT_FILE && \
9
12
tar -czf $DEPLOY_DIR .tar.gz -C $DEPLOY_DIR bundle && \
10
13
rm -rf $DEPLOY_DIR
14
+ fi
11
15
echo $CUR_DEPLOY
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- # Make sure the remote folder is ready.
3
- # {} weren't were being escaped so I made this straight forward.
4
- ssh $USER @$REMOTE " mkdir -p ~/bundles && mkdir -p ~/bundles/$DEPLOY "
5
2
# Send zipped file over.
6
- rsync $HOME /.bundles/$APP -$DEPLOY .tar.gz $REMOTE :~ /bundles/$DEPLOY .tar.gz
3
+ rsync $HOME /.bundles/$APP -$DEPLOY .tar.gz $REMOTE_USER @ $ REMOTE :~ /bundles/$APP - $DEPLOY .tar.gz
7
4
# Unzip and build the bundle.
8
- ssh $USER @$REMOTE " tar -xzf ~/bundles/$DEPLOY .tar.gz -C ~/bundles/$DEPLOY && rm -f ~/bundle && ln -s ~/bundles/$DEPLOY /bundle ~ && cd ~/bundle/programs/server && npm install fibers && npm install"
5
+ ssh $REMOTE_USER @$REMOTE " \
6
+ rm -rf /var/opt/node/$APP &&\
7
+ mkdir -p /var/opt/node/$APP &&\
8
+ tar -xzf ~/bundles/$APP -$DEPLOY .tar.gz -C /var/opt/node/$APP "
You can’t perform that action at this time.
0 commit comments