提交 231622d5 编写于 作者: G gongweibao

modify travis

上级 3d09b348
...@@ -14,8 +14,11 @@ addons: ...@@ -14,8 +14,11 @@ addons:
- python - python
- python-pip - python-pip
- python2.7-dev - python2.7-dev
- go
before_install: before_install:
- pip install virtualenv pre-commit - pip install virtualenv pre-commit
install:
- GOPATH=/tmp/go go get -u github.com/wangkuiyi/ipynb/markdown-to-ipynb
script: script:
- travis/precommit.sh - travis/precommit.sh
notifications: notifications:
......
#!/bin/sh #!/bin/sh
command -v go >/dev/null 2>&1 command -v go >/dev/null 2>&1
if [[ $? != 0 ]]; then if [ $? -ne 0 ]; then
echo >&2 "Please install https://golang.org/doc/install#install" echo >&2 "Please install https://golang.org/doc/install#install"
exit 1 exit 1
fi fi
...@@ -10,7 +10,7 @@ GOPATH=/tmp/go go get -u github.com/wangkuiyi/ipynb/markdown-to-ipynb ...@@ -10,7 +10,7 @@ GOPATH=/tmp/go go get -u github.com/wangkuiyi/ipynb/markdown-to-ipynb
for file in $@ ; do for file in $@ ; do
/tmp/go/bin/markdown-to-ipynb < $file > ${file%.*}".ipynb" /tmp/go/bin/markdown-to-ipynb < $file > ${file%.*}".ipynb"
if [[ $? != 0 ]]; then if [ $? -ne 0 ]; then
echo >&2 "markdown-to-ipynb $file error" echo >&2 "markdown-to-ipynb $file error"
exit 1 exit 1
fi fi
......
#!/bin/sh #!/bin/sh
command -v go >/dev/null 2>&1 command -v go >/dev/null 2>&1
if [[ $? != 0 ]]; then if [ $? -ne 0 ]; then
echo >&2 "Please install go https://golang.org/doc/install#install" echo >&2 "Please install go https://golang.org/doc/install#install"
exit 1 exit 1
fi fi
GOPATH=/tmp/go go get -u github.com/wangkuiyi/ipynb/markdown-to-ipynb #GOPATH=/tmp/go go get -u github.com/wangkuiyi/ipynb/markdown-to-ipynb
cur_path=$(dirname $(readlink -f $0)) cur_path=$(dirname $(readlink -f $0))
cd $cur_path/../ cd $cur_path/../
...@@ -13,7 +13,7 @@ cd $cur_path/../ ...@@ -13,7 +13,7 @@ cd $cur_path/../
#convert md to ipynb #convert md to ipynb
for file in */{README,README\.en}.md ; do for file in */{README,README\.en}.md ; do
/tmp/go/bin/markdown-to-ipynb < $file > ${file%.*}".ipynb" /tmp/go/bin/markdown-to-ipynb < $file > ${file%.*}".ipynb"
if [[ $? != 0 ]]; then if [ $? -ne 0 ]; then
echo >&2 "markdown-to-ipynb $file error" echo >&2 "markdown-to-ipynb $file error"
exit 1 exit 1
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册