rewrite deploy tests
This commit is contained in:
parent
54208f6fc3
commit
b35ad76ec6
3 changed files with 13 additions and 3 deletions
|
@ -24,9 +24,9 @@ script:
|
||||||
- make image
|
- make image
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
if ([ "$TRAVIS_BRANCH" == "master" ] || [ ! -z "$TRAVIS_TAG" ]) &&
|
if ([ "$TRAVIS_BRANCH" = "master" ] || [ ! -z "$TRAVIS_TAG" ]) && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||||
[ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
echo "Deploying"
|
||||||
script/deploy.sh
|
make deploy
|
||||||
else
|
else
|
||||||
echo "Skipping deploy"
|
echo "Skipping deploy"
|
||||||
fi
|
fi
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -88,3 +88,6 @@ lint:
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
gofmt -s -l -w $(SRCS)
|
gofmt -s -l -w $(SRCS)
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
./script/deploy.sh
|
||||||
|
|
7
script/deploy.sh
Normal file → Executable file
7
script/deploy.sh
Normal file → Executable file
|
@ -1,6 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if ([ "$TRAVIS_BRANCH" = "master" ] || [ ! -z "$TRAVIS_TAG" ]) && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||||
|
echo "Deploying"
|
||||||
|
else
|
||||||
|
echo "Skipping deploy"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
curl -LO https://github.com/tcnksm/ghr/releases/download/pre-release/linux_amd64.zip
|
curl -LO https://github.com/tcnksm/ghr/releases/download/pre-release/linux_amd64.zip
|
||||||
unzip -q linux_amd64.zip
|
unzip -q linux_amd64.zip
|
||||||
sudo mv grh /usr/bin/ghr
|
sudo mv grh /usr/bin/ghr
|
||||||
|
|
Loading…
Reference in a new issue