# version format
version: "{build}"

# Operating system (build VM template)
os: Windows Server 2012 R2

clone_folder: c:\gopath\src\github.com\minio\mc

# environment variables
environment:
  GOPATH: c:\gopath
  GOROOT: c:\go

# scripts that run after cloning repository
install:
  - set PATH=%GOPATH%\bin;%GOROOT%\bin;%PATH%
  - go version
  - go env
  - python --version

# to run your custom scripts instead of automatic MSBuild
build_script:
  - go test -race github.com/minio/mc/cmd...
  - go test -race github.com/minio/mc/pkg...
  - go test -coverprofile=coverage.txt -covermode=atomic
  - go run buildscripts/gen-ldflags.go > temp.txt
  - set /p BUILD_LDFLAGS=<temp.txt
  - go build -ldflags="%BUILD_LDFLAGS%" -o %GOPATH%\bin\mc.exe
  - mc version

after_test:
  - bash <(curl -s https://codecov.io/bash)

# to disable automatic tests
test: off

# to disable deployment
deploy: off
