diff --git a/.appveyor.yml b/.appveyor.yml index 87bee5bf4..c9afa18a7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -43,4 +43,4 @@ artifacts: - path: build/*-v*.zip deploy_script: -- IF "%APPVEYOR_REPO_BRANCH%" == "master" make upload_beta +- IF "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" make appveyor_upload diff --git a/.travis.yml b/.travis.yml index 99b384b79..6bfa7f5da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,6 @@ deploy: provider: script script: make travis_beta on: - branch: master + all_branches: true go: "1.10" - condition: "`uname` == 'Linux'" + condition: "`uname` == 'Linux' && $TRAVIS_PULL_REQUEST == 'false'" diff --git a/Makefile b/Makefile index aa1d146c5..a9848c30c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ SHELL = bash -TAG := $(shell echo `git describe --abbrev=8 --tags`-`git rev-parse --abbrev-ref HEAD` | sed 's/-\([0-9]\)-/-00\1-/; s/-\([0-9][0-9]\)-/-0\1-/; s/-\(HEAD\|master\)$$//') +TAG := $(shell echo $$(git describe --abbrev=8 --tags)-$${APPVEYOR_REPO_BRANCH:-$${TRAVIS_BRANCH:-$$(git rev-parse --abbrev-ref HEAD)}} | sed 's/-\([0-9]\)-/-00\1-/; s/-\([0-9][0-9]\)-/-0\1-/; s/-\(HEAD\|master\)$$//') LAST_TAG := $(shell git describe --tags --abbrev=0) NEW_TAG := $(shell echo $(LAST_TAG) | perl -lpe 's/v//; $$_ += 0.01; $$_ = sprintf("v%.2f", $$_)') GO_VERSION := $(shell go version) @@ -121,11 +121,6 @@ beta: 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*' --include version.txt build/ memstore:beta-rclone-org - @echo Beta release ready at $(BETA_URL) - compile_all: ifdef FULL_TESTS go run bin/cross-compile.go -parallel 8 -compile-only $(BUILDTAGS) $(TAG)β @@ -133,11 +128,20 @@ else @echo Skipping compile all as version of go too old endif +appveyor_upload: + rclone --config bin/travis.rclone.conf -v copy --exclude '*beta-latest*' build/ memstore:beta-rclone-org/$(TAG) +ifeq ($(APPVEYOR_REPO_BRANCH),master) + rclone --config bin/travis.rclone.conf -v copy --include '*beta-latest*' --include version.txt build/ memstore:beta-rclone-org +endif + @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 -exclude "^windows/" -parallel 8 $(BUILDTAGS) $(TAG)β rclone --config bin/travis.rclone.conf -v copy --exclude '*beta-latest*' build/ memstore:beta-rclone-org/$(TAG) +ifeq ($(TRAVIS_BRANCH),master) rclone --config bin/travis.rclone.conf -v copy --include '*beta-latest*' --include version.txt build/ memstore:beta-rclone-org +endif @echo Beta release ready at $(BETA_URL) # Fetch the windows builds from appveyor