Merge pull request #1030 from github/release-1.1-backport-1025
Backport #1025 for v1.1.x: Go 1.6
This commit is contained in:
commit
4b3b9d5645
18
.travis.yml
18
.travis.yml
@ -1,7 +1,7 @@
|
||||
# http://docs.travis-ci.com/user/languages/go/
|
||||
language: go
|
||||
|
||||
go: 1.5
|
||||
go: 1.6
|
||||
|
||||
os:
|
||||
- linux
|
||||
@ -30,6 +30,22 @@ matrix:
|
||||
- >
|
||||
brew update;
|
||||
brew install git;
|
||||
- env: git-latest-go-1.5
|
||||
os: linux
|
||||
go: 1.5
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- git-core
|
||||
packages:
|
||||
- git
|
||||
- env: git-latest-go-1.5
|
||||
os: osx
|
||||
go: 1.5
|
||||
before_script:
|
||||
- >
|
||||
brew update;
|
||||
brew install git;
|
||||
|
||||
before_install:
|
||||
- >
|
||||
|
@ -12,4 +12,4 @@ fi
|
||||
|
||||
script/fmt
|
||||
rm -rf bin/*
|
||||
go run script/*.go -cmd build "$@"
|
||||
GO15VENDOREXPERIMENT=0 go run script/*.go -cmd build "$@"
|
||||
|
@ -154,12 +154,13 @@ func buildCommand(dir, buildos, buildarch string) error {
|
||||
}
|
||||
|
||||
func buildGoEnv(buildos, buildarch string) []string {
|
||||
env := make([]string, 5, 8)
|
||||
env := make([]string, 6, 9)
|
||||
env[0] = "GOOS=" + buildos
|
||||
env[1] = "GOARCH=" + buildarch
|
||||
env[2] = "GOPATH=" + os.Getenv("GOPATH")
|
||||
env[3] = "GOROOT=" + os.Getenv("GOROOT")
|
||||
env[4] = "PATH=" + os.Getenv("PATH")
|
||||
env[5] = "GO15VENDOREXPERIMENT=" + os.Getenv("GO15VENDOREXPERIMENT")
|
||||
for _, key := range []string{"TMP", "TEMP", "TEMPDIR"} {
|
||||
v := os.Getenv(key)
|
||||
if len(v) == 0 {
|
||||
|
@ -46,4 +46,4 @@ parallel=${GIT_LFS_TEST_MAXPROCS:-4}
|
||||
echo "Running this maxprocs=$parallel"
|
||||
echo
|
||||
|
||||
GIT_LFS_TEST_MAXPROCS=$parallel GIT_LFS_TEST_DIR="$GIT_LFS_TEST_DIR" SHUTDOWN_LFS="no" go run script/*.go -cmd integration "$@"
|
||||
GO15VENDOREXPERIMENT=0 GIT_LFS_TEST_MAXPROCS=$parallel GIT_LFS_TEST_DIR="$GIT_LFS_TEST_DIR" SHUTDOWN_LFS="no" go run script/*.go -cmd integration "$@"
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
script/fmt
|
||||
go run script/*.go -cmd release "$@"
|
||||
GO15VENDOREXPERIMENT=0 go run script/*.go -cmd release "$@"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
script/fmt
|
||||
commit=`git rev-parse --short HEAD`
|
||||
go run -ldflags="-X github.com/github/git-lfs/lfs.GitCommit $commit" ./git-lfs.go "$@"
|
||||
GO15VENDOREXPERIMENT=0 go run -ldflags="-X github.com/github/git-lfs/lfs.GitCommit $commit" ./git-lfs.go "$@"
|
||||
|
@ -7,4 +7,4 @@ suite="./${1:-"lfs"} ./${1:-"git"}"
|
||||
if [ $# -gt 0 ]; then
|
||||
shift
|
||||
fi
|
||||
go test $suite "$@"
|
||||
GO15VENDOREXPERIMENT=0 go test $suite "$@"
|
||||
|
@ -5,6 +5,14 @@
|
||||
# these tests rely on GIT_TERMINAL_PROMPT to test properly
|
||||
ensure_git_version_isnt $VERSION_LOWER "2.3.0"
|
||||
|
||||
# if there is a system cred helper we can't run this test
|
||||
# can't disable without changing state outside test & probably don't have permission
|
||||
# this is common on OS X with certain versions of Git installed, default cred helper
|
||||
if [[ "$(git config --system credential.helper)" -ne "" ]]; then
|
||||
echo "skip: $0 (system cred helper we can't disable)"
|
||||
exit
|
||||
fi
|
||||
|
||||
begin_test "attempt private access without credential helper"
|
||||
(
|
||||
set -e
|
||||
@ -23,7 +31,7 @@ begin_test "attempt private access without credential helper"
|
||||
git config --global --unset credential.helper
|
||||
|
||||
GIT_TERMINAL_PROMPT=0 git push origin master 2>&1 | tee push.log
|
||||
|
||||
grep "Authorization error: $GITSERVER/$reponame" push.log
|
||||
grep "Authorization error: $GITSERVER/$reponame" push.log ||
|
||||
grep "Git credentials for $GITSERVER/$reponame not found" push.log
|
||||
)
|
||||
end_test
|
||||
|
@ -215,10 +215,10 @@ setup() {
|
||||
|
||||
if [ -z "$SKIPCOMPILE" ]; then
|
||||
for go in test/cmd/*.go; do
|
||||
go build -o "$BINPATH/$(basename $go .go)" "$go"
|
||||
GO15VENDOREXPERIMENT=0 go build -o "$BINPATH/$(basename $go .go)" "$go"
|
||||
done
|
||||
# Ensure API test util is built during tests to ensure it stays in sync
|
||||
go build -o "$BINPATH/git-lfs-test-server-api" "test/git-lfs-test-server-api/main.go" "test/git-lfs-test-server-api/testdownload.go" "test/git-lfs-test-server-api/testupload.go"
|
||||
GO15VENDOREXPERIMENT=0 go build -o "$BINPATH/git-lfs-test-server-api" "test/git-lfs-test-server-api/main.go" "test/git-lfs-test-server-api/testdownload.go" "test/git-lfs-test-server-api/testupload.go"
|
||||
fi
|
||||
|
||||
LFSTEST_URL="$LFS_URL_FILE" LFSTEST_DIR="$REMOTEDIR" lfstest-gitserver > "$REMOTEDIR/gitserver.log" 2>&1 &
|
||||
|
Loading…
Reference in New Issue
Block a user