0 Star 1 Fork 1

桂花酒酿冰奶/hexo-theme-snippet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
_travis.sh 1.37 KB
一键复制 编辑 原始数据 按行查看 历史
shenliyang 提交于 2017-10-13 14:19 +08:00 . update travis CI config
#--------------------------------------------
#!/bin/bash
# author:shenliyang
# website:https://github.com/shenliyang
# slogan:梦想还是要有的,万一实现了呢。
#--------------------------------------------
#定义时间
time=`date +%Y-%m-%d\ %H:%M:%S`
#执行成功
function success(){
echo "success"
}
#执行失败
function failure(){
echo "failure"
}
#默认执行
function default(){
git clone https://${GH_REF} .deploy_git
cd .deploy_git
git checkout master
cd ../
mv .deploy_git/.git/ ./public/
cd ./public
cat <<EOF >> README.md
部署状态 | 集成结果 | 参考值
---|---|---
完成时间 | $time | yyyy-mm-dd hh:mm:ss
部署环境 | $TRAVIS_OS_NAME + $TRAVIS_NODE_VERSION | window \| linux + stable
部署类型 | $TRAVIS_EVENT_TYPE | push \| pull_request \| api \| cron
启用Sudo | $TRAVIS_SUDO | false \| true
仓库地址 | $TRAVIS_REPO_SLUG | owner_name/repo_name
提交分支 | $TRAVIS_COMMIT | hash 16位
提交信息 | $TRAVIS_COMMIT_MESSAGE |
Job ID | $TRAVIS_JOB_ID |
Job NUM | $TRAVIS_JOB_NUMBER |
EOF
git init
git config user.name "shenliyang"
git config user.email ""
git add .
git commit -m "Build by Travis CI"
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:master
}
case $1 in
"success")
success
;;
"failure")
failure
;;
*)
default
esac
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
CSS
1
https://gitee.com/markhoo/hexo-theme-snippet.git
[email protected]:markhoo/hexo-theme-snippet.git
markhoo
hexo-theme-snippet
hexo-theme-snippet
master

搜索帮助