From cb651b5866fbc6b6b34f70150b74d4e2d8056945 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 23 Nov 2015 21:58:54 +0000 Subject: [PATCH] Upload releases to github too - fixes #225 --- Makefile | 3 +++ RELEASE.md | 1 + docs/content/downloads.md | 2 ++ docs/content/downloads.md.in | 2 ++ upload-github | 50 ++++++++++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+) create mode 100755 upload-github diff --git a/Makefile b/Makefile index b158fbbe3..dd872d16e 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,9 @@ upload_website: website upload: rclone -v copy build/ memstore:downloads-rclone-org +upload_github: + ./upload_github $(TAG) + cross: doc ./cross-compile $(TAG) diff --git a/RELEASE.md b/RELEASE.md index b700592be..0bfeaba5e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -20,3 +20,4 @@ Making a release * make upload * make upload_website * git push --tags origin master + * make upload_github diff --git a/docs/content/downloads.md b/docs/content/downloads.md index dd65e6370..f3071f1b9 100644 --- a/docs/content/downloads.md +++ b/docs/content/downloads.md @@ -35,6 +35,8 @@ Rclone Download v1.25 * Solaris * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.25-solaris-amd64.zip) +You can also find a [mirror of the downloads on github](https://github.com/ncw/rclone/releases/tag/v1.25). + Downloads for scripting ======================= diff --git a/docs/content/downloads.md.in b/docs/content/downloads.md.in index 97eb682d0..9cf816ca8 100644 --- a/docs/content/downloads.md.in +++ b/docs/content/downloads.md.in @@ -35,6 +35,8 @@ Rclone Download VERSION * Solaris * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-VERSION-solaris-amd64.zip) +You can also find a [mirror of the downloads on github](https://github.com/ncw/rclone/releases/tag/VERSION). + Downloads for scripting ======================= diff --git a/upload-github b/upload-github new file mode 100755 index 000000000..aa3ab9b7c --- /dev/null +++ b/upload-github @@ -0,0 +1,50 @@ +#!/bin/bash +# +# Upload a release +# +# Needs github-release from https://github.com/aktau/github-release + +set -e + +REPO="rclone" + +if [ "$1" == "" ]; then + echo "Syntax: $0 Version" + exit 1 +fi +VERSION="$1" +if [ "$GITHUB_USER" == "" ]; then + echo 1>&2 "Need GITHUB_USER environment variable" + exit 1 +fi +if [ "$GITHUB_TOKEN" == "" ]; then + echo 1>&2 "Need GITHUB_TOKEN environment variable" + exit 1 +fi + +echo "Making release ${VERSION}" +github-release release \ + --repo ${REPO} \ + --tag ${VERSION} \ + --name "rclone" \ + --description "Rclone - rsync for cloud storage. Sync files to and from many cloud storage providers." + +for build in `ls build`; do + echo "Uploading ${build}" + base="${build%.*}" + parts=(${base//-/ }) + os=${parts[3]} + arch=${parts[4]} + + github-release upload \ + --repo ${REPO} \ + --tag ${VERSION} \ + --name "${build}" \ + --file build/${build} +done + +github-release info \ + --repo ${REPO} \ + --tag ${VERSION} + +echo "Done"