forked from hashicorp/consul
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds basic build tag support with different versions. (hashicorp#2463)
- Loading branch information
Showing
8 changed files
with
57 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
export GO15VENDOREXPERIMENT=1 | ||
set -e | ||
|
||
# Create a temp dir and clean it up on exit | ||
TEMPDIR=`mktemp -d -t consul-test.XXX` | ||
trap "rm -rf $TEMPDIR" EXIT HUP INT QUIT TERM | ||
|
||
# Build the Consul binary for the API tests | ||
echo "--> Building consul" | ||
go build -o $TEMPDIR/consul || exit 1 | ||
go build -tags="${BUILD_TAGS}" -o $TEMPDIR/consul || exit 1 | ||
|
||
# Run the tests | ||
echo "--> Running tests" | ||
go list ./... | grep -v '^github.com/hashicorp/consul/vendor/' | PATH=$TEMPDIR:$PATH xargs -n1 go test ${GOTEST_FLAGS:--cover -timeout=360s} | ||
go list ./... | grep -v '^/vendor/' | PATH=$TEMPDIR:$PATH xargs -n1 go test -tags="${BUILD_TAGS}" ${GOTEST_FLAGS:--cover -timeout=360s} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// +build consul | ||
|
||
package version | ||
|
||
// NOTE we rely on other "version_*.go" files to be lexically after | ||
// "version_base.go" in order for this to get properly overridden. Be careful | ||
// adding new versions and pick a name that will follow "version_base.go". | ||
func init() { | ||
// The main version number that is being run at the moment. | ||
Version = "0.7.1" | ||
|
||
// A pre-release marker for the version. If this is "" (empty string) | ||
// then it means that it is a final release. Otherwise, this is a pre-release | ||
// such as "dev" (in development), "beta", "rc1", etc. | ||
VersionPrerelease = "dev" | ||
} |