diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e41a0cd --- /dev/null +++ b/.gitignore @@ -0,0 +1,128 @@ +# Created by .ignore support plugin (hsz.mobi) +### Python template +# Byte-compiled / optimized / DLL files +__pycache__/ +*/__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.vscode +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +#sublime config +.DS_Store +*/.DS_Store +.tags +.tags_sorted_by_file + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# dotenv +# .env + +# virtualenv +.venv/ +venv/ +ENV/ + + +# add by wenxiaoning begin +.idea/ +.npmignore +.serverless/ +node_modules/ +*/.serverless/ +*/node_modules/ +*/node_modules/* +*/.cache/ +*/local_config.py +api/test/winn* +winn* +# add by wenxiaoning end + + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject +metrics.flask.log +crawler/common +*.retry +*.out +*.swp +*/*.swp +*.log.* + +*.pem +golang/pkg/ +golang/bin/ +golang/src/github.com/ +golang/src/gopkg.in/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..d358803 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Create by goss + +[goss](https://github.com/wxnacy/goss)(Github Object Storage System) 使用 Github 构建类似 oss 的对象储存工具,本工具可以很方便的管理 github 数据,可以很方便的搭建图床 + +使用说明请见[文档](https://github.com/wxnacy/goss#%E5%AE%89%E8%A3%85) diff --git a/commit.sh b/commit.sh new file mode 100755 index 0000000..a2b0bf6 --- /dev/null +++ b/commit.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# 部署指定tag 的api程序 +# __author__ = "wenxiaoning(wenxiaoning@gochinatv.com)" +# __copyright__ = "Copyright of GoChinaTV (2017)." + +MSG=$@ +git add . && git commit -m "${MSG}" diff --git a/get_branch.sh b/get_branch.sh new file mode 100755 index 0000000..ce0447d --- /dev/null +++ b/get_branch.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# 部署指定tag 的api程序 +# __author__ = "wenxiaoning(wenxiaoning@gochinatv.com)" +# __copyright__ = "Copyright of GoChinaTV (2017)." + + +# echo '`git branch`' +# git branch | grep '*' | awk '{print $2}' +res=`git branch | grep '*' | awk '{print $2}'` +echo $res diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..1bb0bcb --- /dev/null +++ b/publish.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# Author: wxnacy(wxnacy@gmail.com) +# Description: + + +./push_tag.sh $(date '+%Y.%m.%d.%H%M%S') new version diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..1f0816d --- /dev/null +++ b/push.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# 部署指定tag 的api程序 +# __author__ = "wenxiaoning(wenxiaoning@gochinatv.com)" +# __copyright__ = "Copyright of GoChinaTV (2017)." + +MSG=$@ +branch_name=`./get_branch.sh` + +push(){ + echo '******************************' + echo '********开始push api:' + echo '******************************' + ./commit.sh ${MSG} + git pull origin $branch_name + git add . && git commit -m "${MSG}" + git push origin $branch_name + echo '******************************' + echo '********部署成功' + echo '******************************' +} + +main(){ + if [ ! "${MSG}" ] + then + echo 'UAGE: ./winn_push.sh ' + else + push + fi +} + +main diff --git a/push_tag.sh b/push_tag.sh new file mode 100755 index 0000000..64de11c --- /dev/null +++ b/push_tag.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +TAG_NAME=$1 +PUSH_MSG=${@/$1/} + + +main(){ + ./push.sh $PUSH_MSG + git tag ${TAG_NAME} + git push origin ${TAG_NAME} +} + +if [ ! ${TAG_NAME} ] +then + echo 'UAGE: ./push_tag.sh ' +else + main +fi