3 Star 1 Fork 6

胖子AK / webhooks

加入 Gitee
与超过 600 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未指定开源许可证,未经作者的许可,此代码仅用于学习,不能用于其他用途。
克隆/下载
deploy.sh 1009 Bytes
一键复制 编辑 Web IDE 原始数据 按行查看 历史
penley 提交于 2015-07-16 10:49 . add
#!/bin/sh
#
# Description:
# Script will receive 3 Arguments (Project Name, Environment, Branch)
# Various things happening here:
# 1.) Changing to the repo directory
# 2.) Resetting the local master branch to look exactly like remote origin master branch
# 3.) Clean off any files that don't need to be there
# 4.) Pull just to be doubly sure we have all the latest changes
# 5.) Switches branch to master just to be extra sure that we are on the right
# branch and our working tree has the right files.
#
# Written by: LM
#
if [[ -n "$1" ]] ; then
PROJECT_NAME=$1
else
PROJECT_NAME="lm-blog"
fi
if [[ -n "$2" ]] ; then
BRANCH=$2
else
BRANCH="master"
fi
cd /home/www/$PROJECT_NAME
git reset --hard origin/$BRANCH
git clean -f
git pull
git checkout $BRANCH
# forever stop index.js
# NODE_ENV=production forever start index.js
echo "#-----------------------------------------------#"
echo "# Execution Completed #"
echo "#-----------------------------------------------#"

评论 ( 0 )

你可以在登录后,发表评论

NodeJS
1
https://gitee.com/dokak47/webhooks.git
git@gitee.com:dokak47/webhooks.git
dokak47
webhooks
webhooks
master

搜索帮助