project_name=melon
time=$(date +'%Y%m%d-%H%M%S')
dist=tmp/$project_name-$time.tar.gz
deploy_dir=~/packspaces/$project_name-deploy
yes | rm tmp/$project_name-*.tar.gz;
yes | rm $deploy_dir/$project_name-*.tar.gz;
tar --exclude="tmp/cache/*" -czv -f $dist *
mkdir -p $deploy_dir
mv $dist $deploy_dir
echo $time > $deploy_dir/version
echo 'DONE!'
echo $deploy_dir
网友评论