From 391feb698ec3957feabe4c145b0c5d5f8a02ebb0 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 4 Oct 2016 17:10:20 +0100 Subject: [PATCH] Automatically upload betas on pushes to master * Add links to betas on the download page * Encourage new issue submitters to use the beta --- .travis.yml | 33 +++++++++++++++++++-------------- ISSUE_TEMPLATE.md | 4 ++-- Makefile | 21 +++++++++++++++++++-- bin/travis.rclone.conf | 4 ++++ docs/content/downloads.md | 16 ++++++++++++++++ docs/content/downloads.md.in | 16 ++++++++++++++++ 6 files changed, 76 insertions(+), 18 deletions(-) create mode 100644 bin/travis.rclone.conf diff --git a/.travis.yml b/.travis.yml index 0fe414215..39d12b779 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,26 @@ language: go sudo: false osx_image: xcode7.3 - os: - - linux - - osx - +- linux +- osx go: - - 1.5.4 - - 1.6.3 - - 1.7 - -# - tip - +- 1.5.4 +- 1.6.3 +- 1.7.1 install: - - make build_dep - +- make vars +- make build_dep script: - - make check - - make quicktest +- make check +- make quicktest +env: + matrix: + secure: gU8gCV9R8Kv/Gn0SmCP37edpfIbPoSvsub48GK7qxJdTU628H0KOMiZW/T0gtV5d67XJZ4eKnhJYlxwwxgSgfejO32Rh5GlYEKT/FuVoH0BD72dM1GDFLSrUiUYOdoHvf/BKIFA3dJFT4lk2ASy4Zh7SEoXHG6goBlqUpYx8hVA= +deploy: + provider: script + script: make travis_beta + on: + branch: master + go: 1.7.1 + os: linux diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 538232eed..fe487933d 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,6 +1,6 @@ When filing an issue, please include the following information if -possible as well as a description of the problem. Make sure you are -using the [latest version of rclone](http://rclone.org/downloads/). +possible as well as a description of the problem. Make sure you test +with the [latest beta of rclone](http://rclone.org/downloads/). > What is your rclone version (eg output from `rclone -V`) diff --git a/Makefile b/Makefile index 5895b6b8a..2046cbbcb 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ SHELL = /bin/bash -TAG := $(shell echo `git describe --tags`-`git rev-parse --abbrev-ref HEAD` | sed 's/-master$$//') +TAG := $(shell echo `git describe --tags`-`git rev-parse --abbrev-ref HEAD` | sed 's/-\([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) +GO_LATEST := $(findstring go1.7,$(GO_VERSION)) rclone: - @go version go install -v ./... vars: @@ -12,6 +13,8 @@ vars: @echo TAG="'$(TAG)'" @echo LAST_TAG="'$(LAST_TAG)'" @echo NEW_TAG="'$(NEW_TAG)'" + @echo GO_VERSION="'$(GO_VERSION)'" + @echo GO_LATEST="'$(GO_LATEST)'" # Full suite of integration tests test: rclone @@ -25,17 +28,25 @@ quicktest: # Do source code quality checks check: rclone +ifdef GO_LATEST go vet ./... errcheck ./... goimports -d . | grep . ; test $$? -eq 1 golint ./... | grep -E -v '(StorageUrl|CdnUrl)' ; test $$? -eq 1 +else + @echo Skipping tests as not on Go stable +endif # Get the build dependencies build_dep: go get -t ./... +ifdef GO_LATEST go get -u github.com/kisielk/errcheck go get -u golang.org/x/tools/cmd/goimports go get -u github.com/golang/lint/golint + go get -u github.com/mitchellh/gox + go get -u github.com/inconshreveable/mousetrap +endif # Update dependencies update: @@ -89,6 +100,12 @@ beta: rclone -v copy build/ memstore:pub-rclone-org/$(TAG)β @echo Beta release ready at http://pub.rclone.org/$(TAG)%CE%B2/ +travis_beta: + ./bin/cross-compile $(TAG)β + rm build/*-current-* + rclone --config bin/travis.rclone.conf -v copy build/ memstore:beta-rclone-org/$(TAG) + @echo Beta release ready at http://beta.rclone.org/$(TAG)/ + serve: website cd docs && hugo server -v -w diff --git a/bin/travis.rclone.conf b/bin/travis.rclone.conf new file mode 100644 index 000000000..597253c1a --- /dev/null +++ b/bin/travis.rclone.conf @@ -0,0 +1,4 @@ +# Encrypted rclone configuration File + +RCLONE_ENCRYPT_V0: +XIkAr3p+y+zai82cHFH8UoW1y1XTe6dpTzo/g4uSwqI2pfsnSSJ4JbAsRZ9nGVpx3NzROKEewlusVHNokiA4/nD4NbT+2DJrpMLg/OtLREICfuRk3tVWPKLGsmA+TLKU+IfQMO4LfrrCe2DF/lW0qA5Xu16E0Vn++jNhbwW2oB+JTkaGka8Ae3CyisM/3NUGnCOG/yb5wLH7ybUstNYPHsNFCiU1brFXQ4DNIbUFMmca+5S44vrOWvhp9QijQXlG7/JjwrkqbB/LK2gMJPTuhY2OW+4tRw1IoCXbWmwJXv5xmhPqanW92A== \ No newline at end of file diff --git a/docs/content/downloads.md b/docs/content/downloads.md index c94af82f3..5122f5474 100644 --- a/docs/content/downloads.md +++ b/docs/content/downloads.md @@ -37,6 +37,22 @@ Rclone Download v1.33 You can also find a [mirror of the downloads on github](https://github.com/ncw/rclone/releases/tag/v1.33). +Beta releases +============= + +[Beta releases](http://beta.rclone.org) are generated from each commit +to master. Note these are named like + + {Version Tag}-{Commit Number}-g{Git Commit Hash} + +You can match the `Git Commit Hash` up with `git log`. The most +recent release will have the largest `Version Tag` and `Commit Number` +and will normally be at the end of the list. + +The beta releases haven't been through the full integration test suite +like the releases. However it is useful to try the latest beta before +reporting an issue. + Downloads for scripting ======================= diff --git a/docs/content/downloads.md.in b/docs/content/downloads.md.in index 3d012e4c6..08d66506d 100644 --- a/docs/content/downloads.md.in +++ b/docs/content/downloads.md.in @@ -38,6 +38,22 @@ Rclone Download VERSION You can also find a [mirror of the downloads on github](https://github.com/ncw/rclone/releases/tag/VERSION). +Beta releases +============= + +[Beta releases](http://beta.rclone.org) are generated from each commit +to master. Note these are named like + + {Version Tag}-{Commit Number}-g{Git Commit Hash} + +You can match the `Git Commit Hash` up with `git log`. The most +recent release will have the largest `Version Tag` and `Commit Number` +and will normally be at the end of the list. + +The beta releases haven't been through the full integration test suite +like the releases. However it is useful to try the latest beta before +reporting an issue. + Downloads for scripting =======================