Upload releases to github too - fixes #225

This commit is contained in:
Nick Craig-Wood 2015-11-23 21:58:54 +00:00
parent 3c1069c815
commit cb651b5866
5 changed files with 58 additions and 0 deletions

View File

@ -50,6 +50,9 @@ upload_website: website
upload: upload:
rclone -v copy build/ memstore:downloads-rclone-org rclone -v copy build/ memstore:downloads-rclone-org
upload_github:
./upload_github $(TAG)
cross: doc cross: doc
./cross-compile $(TAG) ./cross-compile $(TAG)

View File

@ -20,3 +20,4 @@ Making a release
* make upload * make upload
* make upload_website * make upload_website
* git push --tags origin master * git push --tags origin master
* make upload_github

View File

@ -35,6 +35,8 @@ Rclone Download v1.25
* Solaris * Solaris
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.25-solaris-amd64.zip) * [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 Downloads for scripting
======================= =======================

View File

@ -35,6 +35,8 @@ Rclone Download VERSION
* Solaris * Solaris
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-VERSION-solaris-amd64.zip) * [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 Downloads for scripting
======================= =======================

50
upload-github Executable file
View File

@ -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"