Inject portbase dependency in CI testing

This commit is contained in:
Daniel 2020-04-08 14:18:51 +02:00
parent e1bab8068f
commit b5c4d04f6f
2 changed files with 19 additions and 0 deletions

18
.ci-inject-internal-deps.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
DEP_FILE="Gopkg.toml"
# remove ignored internal deps
sed -i '/ignored = \["github.com\/safing\//d' $DEP_FILE
# portbase
PORTBASE_BRANCH="develop"
git branch | grep "* master" >/dev/null
if [ $? -eq 0 ]; then
PORTBASE_BRANCH="master"
fi
echo "
[[constraint]]
name = \"github.com/safing/portbase\"
branch = \"${PORTBASE_BRANCH}\"
" >> $DEP_FILE

View file

@ -17,6 +17,7 @@ branches:
install:
- go get -d -u github.com/golang/dep
- go install github.com/golang/dep/cmd/dep
- ./.ci-inject-internal-deps.sh
- dep ensure
- ./test install