Make a beta release for all branches on the main repo (but not pull requests)

This commit is contained in:
Nick Craig-Wood 2018-02-20 15:11:41 +00:00
parent 20ca7d0e4f
commit 0ce81f68fe
3 changed files with 13 additions and 9 deletions

View File

@ -43,4 +43,4 @@ artifacts:
- path: build/*-v*.zip - path: build/*-v*.zip
deploy_script: deploy_script:
- IF "%APPVEYOR_REPO_BRANCH%" == "master" make upload_beta - IF "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" make appveyor_upload

View File

@ -39,6 +39,6 @@ deploy:
provider: script provider: script
script: make travis_beta script: make travis_beta
on: on:
branch: master all_branches: true
go: "1.10" go: "1.10"
condition: "`uname` == 'Linux'" condition: "`uname` == 'Linux' && $TRAVIS_PULL_REQUEST == 'false'"

View File

@ -1,5 +1,5 @@
SHELL = bash 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) LAST_TAG := $(shell git describe --tags --abbrev=0)
NEW_TAG := $(shell echo $(LAST_TAG) | perl -lpe 's/v//; $$_ += 0.01; $$_ = sprintf("v%.2f", $$_)') NEW_TAG := $(shell echo $(LAST_TAG) | perl -lpe 's/v//; $$_ += 0.01; $$_ = sprintf("v%.2f", $$_)')
GO_VERSION := $(shell go version) GO_VERSION := $(shell go version)
@ -121,11 +121,6 @@ beta:
log_since_last_release: log_since_last_release:
git log $(LAST_TAG).. 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: compile_all:
ifdef FULL_TESTS ifdef FULL_TESTS
go run bin/cross-compile.go -parallel 8 -compile-only $(BUILDTAGS) $(TAG)β 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 @echo Skipping compile all as version of go too old
endif 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: travis_beta:
git log $(LAST_TAG).. > /tmp/git-log.txt 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)β 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) 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 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) @echo Beta release ready at $(BETA_URL)
# Fetch the windows builds from appveyor # Fetch the windows builds from appveyor