Skip to content

Commit

Permalink
Merge pull request geeeeeeeeek#225 from ripples-alive/feature/qiniu-d…
Browse files Browse the repository at this point in the history
…ownload

update for Chinese qiniu download server
  • Loading branch information
Zhongyi Tong authored and Zhongyi Tong committed Jun 3, 2016
2 parents 8af226e + 8939d00 commit 45c39b8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ before_script:
script:
- ./scripts/build-all.sh
- ./scripts/tar-all.sh
- sudo bash scripts/qiniu.sh
deploy:
provider: releases
api_key:
Expand All @@ -31,3 +30,5 @@ notifications:
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: always # options: [always|never|change] default: always
after_deploy:
- ./scripts/qiniu.sh
5 changes: 0 additions & 5 deletions conf.json

This file was deleted.

36 changes: 29 additions & 7 deletions scripts/qiniu.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
#!/bin/bash

wget http://devtools.qiniu.com/qiniu-devtools-linux_amd64-current.tar.gz -P /home/travis/build/geeeeeeeeek/electronic-wechat
tar -xvf /home/travis/build/geeeeeeeeek/electronic-wechat/qiniu-devtools-linux_amd64-current.tar.gz -C /home/travis/build/geeeeeeeeek/electronic-wechat
mkdir /home/travis/build/geeeeeeeeek/electronic-wechat/output
cp /home/travis/build/geeeeeeeeek/electronic-wechat/dist/mac-osx.tar.gz /home/travis/build/geeeeeeeeek/electronic-wechat/output
cp /home/travis/build/geeeeeeeeek/electronic-wechat/dist/linux-x64.tar.gz /home/travis/build/geeeeeeeeek/electronic-wechat/output
cp /home/travis/build/geeeeeeeeek/electronic-wechat/dist/linux-ia32.tar.gz /home/travis/build/geeeeeeeeek/electronic-wechat/output
./qrsync conf.json
case "$(uname -s)" in

Linux*)
wget http://devtools.qiniu.com/qiniu-devtools-linux_amd64-current.tar.gz -O dist/qiniu-devtools.tar.gz
;;

Darwin)
wget http://devtools.qiniu.io/qiniu-devtools-darwin_amd64-current.tar.gz -O dist/qiniu-devtools.tar.gz
;;

*)
;;

esac

mkdir dist/qiniu-devtools
tar -xvf dist/qiniu-devtools.tar.gz -C dist/qiniu-devtools
rm -rf /tmp/qiniu
mkdir /tmp/qiniu
cp dist/mac-osx.tar.gz /tmp/qiniu
cp dist/linux-x64.tar.gz /tmp/qiniu
cp dist/linux-ia32.tar.gz /tmp/qiniu

echo '{
"src": "/tmp/qiniu",
"dest": "qiniu:access_key='$QINIU_ACCESS_KEY'&secret_key='$QINIU_SECRET_KEY'&bucket=flymeos-cancro",
"debug_level": 1
}' > qiniu-config.json
./dist/qiniu-devtools/qrsync qiniu-config.json

0 comments on commit 45c39b8

Please sign in to comment.