File: buildTerraform.sh

package info (click to toggle)
golang-github-azure-azure-sdk-for-go 10.3.0~beta-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, experimental
  • size: 15,936 kB
  • ctags: 22,331
  • sloc: sh: 33; makefile: 8
file content (36 lines) | stat: -rw-r--r-- 834 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This script tries to build Terraform related packages,
# and find possible breaking changes regarding the Azure
# SDK for Go

set -x

# This should only run on cronjobs
if [ "cron" != $TRAVIS_EVENT_TYPE ]; then
    exit 0
fi

# Only meant to run on latest go version
if [ "go version go1.8 linux/amd64" != "$(go version)" ]; then
    exit 0
fi

go get github.com/kardianos/govendor
REALEXITSTATUS=0

packages=(github.com/hashicorp/terraform
    github.com/terraform-providers/terraform-provider-azurerm
    github.com/terraform-providers/terraform-provider-azure)

for package in ${packages[*]}; do
    go get $package
    cd $GOPATH/src/$package

    # update to latest SDK
    govendor update github.com/Azure/azure-sdk-for-go/...

    # try to build
    make
    REALEXITSTATUS=$(($REALEXITSTATUS+$?))
done

exit $REALEXITSTATUS