From 09093a99544850c02f7722f707c79f7deecea73c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 13 May 2017 09:59:41 +0100 Subject: [PATCH] Use appveyor to build the Windows beta releases --- .appveyor.yml | 28 +++++++++++++++++++++++++--- Makefile | 15 +++++++++++++-- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 2b19af690..8c78ea8f0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,12 +5,20 @@ os: Windows Server 2012 R2 clone_folder: c:\gopath\src\github.com\ncw\rclone environment: - GOPATH: c:\gopath + GOPATH: C:\gopath CPATH: C:\Program Files (x86)\WinFsp\inc\fuse - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;c:\MinGW\bin;%PATH% + ORIGPATH: '%PATH%' + NOCCPATH: C:\MinGW\bin;%GOPATH%\bin;%PATH% + PATHCC64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%NOCCPATH% + PATHCC32: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;%NOCCPATH% + PATH: '%PATHCC64%' + RCLONE_CONFIG_PASS: + secure: HbzxSy9zQ8NYWN9NNPf6ALQO9Q0mwRNqwehsLcOEHy0= install: - choco install winfsp -y +- choco install zip -y +- copy c:\MinGW\bin\mingw32-make.exe c:\MinGW\bin\make.exe build_script: - echo %PATH% @@ -18,7 +26,21 @@ build_script: - go version - go env - go install +- go build +- make log_since_last_release > %TEMP%\git-log.txt +- make version > %TEMP%\version +- set /p RCLONE_VERSION=<%TEMP%\version +- set PATH=%PATHCC32% +- go run bin/cross-compile.go -release beta-latest -git-log %TEMP%\git-log.txt -include "^windows/386" -cgo %RCLONE_VERSION% +- set PATH=%PATHCC64% +- go run bin/cross-compile.go -release beta-latest -git-log %TEMP%\git-log.txt -include "^windows/amd64" -cgo -no-clean %RCLONE_VERSION% test_script: -- copy c:\MinGW\bin\mingw32-make.exe c:\MinGW\bin\make.exe - make quicktest + +artifacts: +- path: rclone.exe +- path: build/*-v*.zip + +deploy_script: +- IF "%APPVEYOR_REPO_BRANCH%" == "master" make upload_beta diff --git a/Makefile b/Makefile index 6b3efd51f..748fa7bb9 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ GO_FILES := $(shell go list ./... | grep -v /vendor/ ) GO_LATEST := $(findstring go1.8,$(GO_VERSION)) BETA_URL := https://beta.rclone.org/$(TAG)/ -.PHONY: rclone +.PHONY: rclone vars version rclone: touch fs/version.go @@ -23,6 +23,9 @@ vars: @echo GO_LATEST="'$(GO_LATEST)'" @echo BETA_URL="'$(BETA_URL)'" +version: + @echo '$(TAG)' + # Full suite of integration tests test: rclone go test $(GO_FILES) @@ -105,9 +108,17 @@ beta: rclone -v copy build/ memstore:pub-rclone-org/$(TAG)β @echo Beta release ready at https://pub.rclone.org/$(TAG)%CE%B2/ +log_since_last_release: + git log $(LAST_TAG).. + +upload_beta: + rclone --config bin/travis.rclone.conf -v copy --exclude '*beta-latest*' build/ memstore:beta-rclone-org/$(TAG) + rclone --config bin/travis.rclone.conf -v copy --include '*beta-latest*' build/ memstore:beta-rclone-org + @echo Beta release ready at $(BETA_URL) + travis_beta: git log $(LAST_TAG).. > /tmp/git-log.txt - go run bin/cross-compile.go -release beta-latest -git-log /tmp/git-log.txt $(TAG)β + go run bin/cross-compile.go -release beta-latest -git-log /tmp/git-log.txt -exclude "^windows/" $(TAG)β rclone --config bin/travis.rclone.conf -v copy --exclude '*beta-latest*' build/ memstore:beta-rclone-org/$(TAG) rclone --config bin/travis.rclone.conf -v copy --include '*beta-latest*' build/ memstore:beta-rclone-org @echo Beta release ready at $(BETA_URL)