git-lfs/appveyor.yml
Taylor Blau 79f8e7cb76 Makefile: force callers to have goversioninfo in $PATH
In 22351986 (Makefile: replace script/bootstrap with 'make', 'make all',
2018-07-19), the Makefile learned how to make binaries of git-lfs,
including invoking 'go generate' in order to generate the resource.syso,
necessary for building on Windows.

In the commit mentioned above, we taught the Makefile recipe for
'resource.syso' to 'go get' the necessary 'goversioninfo' binary before
building, if callers do not have it.

In Go 1.10.3 and earlier, this caused no change to the vendor directory
or glide.yaml file, and instead installed the project in '$GOPATH', and
built the binary in '$GOPATH/bin'.

Since we are on Go 1.11, now, and running 'go get' from inside a module
directory causes the module's go.mod (and thusly, the go.sum, too) to
change, let's make it the caller's responsibility to provide a valid
'goversioninfo' binary in '$PATH'.

This allows us to avoid the burden of cleaning up after ourselves when
running 'go get' from within a directory that is itself a Go module.
2018-08-29 15:13:17 -04:00

55 lines
1.6 KiB
YAML

image: Visual Studio 2017
skip_branch_with_pr: true
environment:
GIT_LFS_NO_TEST_COUNT: 1
GIT_LFS_LOCK_ACQUIRE_DISABLED: 1
GOPATH: C:\Users\appveyor\go
MSYSTEM: MINGW64
clone_folder: $(USERPROFILE)\src\git-lfs
install:
- rd C:\Go /s /q
- rd C:\Perl /s /q
- refreshenv
- curl -sL -o go1.11.windows-amd64.zip https://storage.googleapis.com/golang/go1.11.windows-amd64.zip
- 7z x go1.11.windows-amd64.zip -oC:\ >nul
- C:\go\bin\go version
- cd %USERPROFILE%\src
- C:\go\bin\go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo
- cd %USERPROFILE%\src\git-lfs
- cinst InnoSetup -y
- cinst strawberryperl -y
- refreshenv
- cinst make
- refreshenv
- set PATH=%GOPATH%\bin;%PATH%
- ps: |
echo "Go directories in machine PATH environment:"
[environment]::GetEnvironmentVariable("PATH","Machine").split(";") | Select-String -Pattern "\\go\\"
echo "Go directories in user PATH environment:"
[environment]::GetEnvironmentVariable("PATH","User").split(";") | Select-String -Pattern "\\go\\"
echo "Go directories in process PATH environment:"
[environment]::GetEnvironmentVariable("PATH","Process").split(";") | Select-String -Pattern "\\go\\"
echo "Go version information:"
go version
build_script:
- bash --login -c 'make GOARCH=386 -B'
- mv bin\git-lfs.exe git-lfs-x86.exe
- bash --login -c 'make GOARCH=amd64 -B'
- mv bin\git-lfs.exe git-lfs-x64.exe
after_build:
- iscc script\windows-installer\inno-setup-git-lfs-installer.iss
test_script:
- bash --login script/cibuild
artifacts:
- path: git-lfs-x86.exe
- path: git-lfs-x64.exe
- path: git-lfs-windows-*.exe