From 365dc2ff5993463881d88244d567189cc2c6a32f Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 24 Apr 2014 18:11:08 +0100 Subject: [PATCH] Version v0.96 - automate the release process --- .gitignore | 3 +++ Makefile | 51 ++++++++++++++++++++++++++++++----- README.md | 37 ++++++++++++++++++++++--- cross-compile | 35 +++++++++++++----------- docs/content/about.md | 2 +- docs/content/docs.md | 2 +- docs/content/downloads.md | 35 ++++++++++++++++++++++++ docs/content/downloads.md.in | 35 ++++++++++++++++++++++++ docs/content/local.md | 6 +++++ docs/layouts/base/navbar.html | 2 ++ notes.txt | 19 +++++++++++++ rclonetest/version.go | 2 +- version.go | 2 +- 13 files changed, 203 insertions(+), 28 deletions(-) create mode 100644 docs/content/downloads.md create mode 100644 docs/content/downloads.md.in diff --git a/.gitignore b/.gitignore index 32e2394dc..e98cba6d2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ rclone rclonetest/rclonetest build docs/public +README.html +README.txt +rclone.1 diff --git a/Makefile b/Makefile index f79015a58..b27b993f6 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,61 @@ -rclone: +TAG := $(shell git describe --tags) +LAST_TAG := $(shell git describe --tags --abbrev=0) +NEW_TAG := $(shell echo $(LAST_TAG) | perl -lpe 's/v//; $$_ += 0.01; $$_ = "v" . $$_') + +rclone: *.go */*.go + @go version go build +doc: rclone.1 README.html README.txt + +rclone.1: README.md + pandoc -s --from markdown --to man README.md -o rclone.1 + +README.html: README.md + pandoc -s --from markdown_github --to html README.md -o README.html + +README.txt: README.md + pandoc -s --from markdown_github --to plain README.md -o README.txt + +install: rclone + install -d ${DESTDIR}/usr/bin + install -t ${DESTDIR}/usr/bin rclone + clean: - go clean + go clean ./... find . -name \*~ | xargs -r rm -f rm -rf build docs/public + rm -f rclone rclonetest/rclonetest rclone.1 README.html README.txt website: cd docs && hugo upload_website: website - ./rclone sync docs/public memstore:www-rclone-org + ./rclone -v sync docs/public memstore:www-rclone-org upload: - rsync -avz build/ www.craig-wood.com:public_html/pub/rclone/ + ./rclone -v copy build/ memstore:downloads-rclone-org -cross: - ./cross-compile +cross: doc + ./cross-compile $(TAG) serve: cd docs && hugo server -v -w + +tag: + @echo "Old tag is $(LAST_TAG)" + @echo "New tag is $(NEW_TAG)" + echo -e "package main\n const Version = \"$(NEW_TAG)\"\n" | gofmt > version.go + cp -av version.go rclonetest/version.go + perl -lpe 's/VERSION/${NEW_TAG}/g; s/DATE/'`date -I`'/g;' docs/content/downloads.md.in > docs/content/downloads.md + git tag $(NEW_TAG) + @echo "Add this to changelog in README.md" + @echo " * $(NEW_TAG) - " `date -I` + @git log $(LAST_TAG)..$(NEW_TAG) --oneline + @echo "Then commit the changes" + @echo git commit -m "Version $(NEW_TAG)" -a -v + @echo "And finally run make retag before make cross etc" + +retag: + echo git tag -f $(LAST_TAG) + diff --git a/README.md b/README.md index 71b0514de..cd9d3665e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +% rclone(1) User Manual +% Nick Craig-Wood +% Apr 24, 2014 + Rclone ====== @@ -29,13 +33,13 @@ Install Rclone is a Go program and comes as a single binary file. -Download the relevant binary from +Download the binary for your OS from - * http://www.craig-wood.com/nick/pub/rclone/ + * http://rclone.org/downloads/ Or alternatively if you have Go installed use - go get github.com/ncw/rclone + go install github.com/ncw/rclone and this will build the binary in `$GOPATH/bin`. @@ -190,6 +194,33 @@ Bugs * Empty directories left behind with Local and Drive * eg purging a local directory with subdirectories doesn't work +Changelog +--------- + + * v0.96 - 2014-04-24 + * drive: Fix multiple files of same name being created + * drive: Use o.Update and fs.Put to optimise transfers + * Add version number, -V and --version + * v0.95 - 2014-03-28 + * rclone.org: website, docs and graphics + * drive: fix path parsing + * v0.94 - 2014-03-27 + * Change remote format one last time + * GNU style flags + * v0.93 - 2014-03-16 + * drive: store token in config file + * cross compile other versions + * set strict permissions on config file + * v0.92 - 2014-03-15 + * Config fixes and --config option + * v0.91 - 2014-03-15 + * Make config file + * v0.90 - 2013-06-27 + * Project named rclone + * v0.00 - 2012-11-18 + * Project started + + Contact and support ------------------- diff --git a/cross-compile b/cross-compile index d9926c971..ffb35411a 100755 --- a/cross-compile +++ b/cross-compile @@ -1,26 +1,31 @@ #!/bin/sh +set -e + # This uses gox from https://github.com/mitchellh/gox # Make sure you've run gox -build-toolchain +if [ "$1" == "" ]; then + echo "Syntax: $0 Version" + exit 1 +fi +VERSION="$1" + rm -rf build -gox -output "build/{{.OS}}/{{.Arch}}/{{.Dir}}" +gox -output "build/{{.Dir}}-${VERSION}-{{.OS}}-{{.Arch}}/{{.Dir}}" -cat <<'#EOF' > build/README.txt -This directory contains builds of the rclone program. +mv build/rclone-${VERSION}-darwin-amd64 build/rclone-${VERSION}-osx-amd64 +mv build/rclone-${VERSION}-darwin-386 build/rclone-${VERSION}-osx-386 -Rclone is a program to transfer files to and from cloud storage -systems such as Google Drive, Amazon S3 and Swift (Rackspace -Cloudfiles). +cd build -See the project website here: https://github.com/ncw/rclone for more -details. +for d in `ls`; do + cp -a ../README.txt $d/ + cp -a ../README.html $d/ + cp -a ../rclone.1 $d/ + zip -r9 $d.zip $d + rm -rf $d +done -The files in this directory are organised by OS and processor type - -#EOF - -mv build/darwin build/osx - -( cd build ; tree . >> README.txt ) +cd .. diff --git a/docs/content/about.md b/docs/content/about.md index bfb4f8979..153d779ff 100644 --- a/docs/content/about.md +++ b/docs/content/about.md @@ -33,6 +33,6 @@ Links * [Home page](http://rclone.org/) * [Github project page for source and more instructions](http://github.com/ncw/rclone) * Google+ page - * [Downloads](http://www.craig-wood.com/nick/pub/rclone/) + * [Downloads](/downloads/) rclone is brought to you by Nick Craig-Wood diff --git a/docs/content/docs.md b/docs/content/docs.md index d32ef7c18..7bccc92db 100644 --- a/docs/content/docs.md +++ b/docs/content/docs.md @@ -9,7 +9,7 @@ Install Rclone is a Go program and comes as a single binary file. -[Download the relevant binary.](http://www.craig-wood.com/nick/pub/rclone/) +[Download the relevant binary.](/downloads/) Or alternatively if you have Go installed use diff --git a/docs/content/downloads.md b/docs/content/downloads.md new file mode 100644 index 000000000..133be38d2 --- /dev/null +++ b/docs/content/downloads.md @@ -0,0 +1,35 @@ +--- +title: "Rclone downloads" +description: "Download rclone binaries for your OS." +type: page +date: "2014-04-25" +--- + +v0.96 +===== + + * Windows + * [386 - 32 Bit](http://downloads.rclone.org/rclone-v0.96-windows-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v0.96-windows-amd64.zip) + * OSX + * [386 - 32 Bit](http://downloads.rclone.org/rclone-v0.96-osx-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v0.96-osx-amd64.zip) + * Linux + * [386 - 32 Bit](http://downloads.rclone.org/rclone-v0.96-linux-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v0.96-linux-amd64.zip) + * [ARM - 32 Bit](http://downloads.rclone.org/rclone-v0.96-linux-arm.zip) + * FreeBSD + * [386 - 32 Bit](http://downloads.rclone.org/rclone-v0.96-freebsd-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v0.96-freebsd-amd64.zip) + * [ARM - 32 Bit](http://downloads.rclone.org/rclone-v0.96-freebsd-arm.zip) + * NetBSD + * [386 - 32 Bit](http://downloads.rclone.org/rclone-v0.96-netbsd-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v0.96-netbsd-amd64.zip) + * [ARM - 32 Bit](http://downloads.rclone.org/rclone-v0.96-netbsd-arm.zip) + * OpenBSD + * [386 - 32 Bit](http://downloads.rclone.org/rclone-v0.96-openbsd-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v0.96-openbsd-amd64.zip) + * Plan 9 + * [386 - 32 Bit](http://downloads.rclone.org/rclone-v0.96-plan9-386.zip) + +Older downloads can be found [here](http://downloads.rclone.org/) diff --git a/docs/content/downloads.md.in b/docs/content/downloads.md.in new file mode 100644 index 000000000..8b71a7b7f --- /dev/null +++ b/docs/content/downloads.md.in @@ -0,0 +1,35 @@ +--- +title: "Rclone downloads" +description: "Download rclone binaries for your OS." +type: page +date: "DATE" +--- + +VERSION +===== + + * Windows + * [386 - 32 Bit](http://downloads.rclone.org/rclone-VERSION-windows-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-VERSION-windows-amd64.zip) + * OSX + * [386 - 32 Bit](http://downloads.rclone.org/rclone-VERSION-osx-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-VERSION-osx-amd64.zip) + * Linux + * [386 - 32 Bit](http://downloads.rclone.org/rclone-VERSION-linux-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-VERSION-linux-amd64.zip) + * [ARM - 32 Bit](http://downloads.rclone.org/rclone-VERSION-linux-arm.zip) + * FreeBSD + * [386 - 32 Bit](http://downloads.rclone.org/rclone-VERSION-freebsd-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-VERSION-freebsd-amd64.zip) + * [ARM - 32 Bit](http://downloads.rclone.org/rclone-VERSION-freebsd-arm.zip) + * NetBSD + * [386 - 32 Bit](http://downloads.rclone.org/rclone-VERSION-netbsd-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-VERSION-netbsd-amd64.zip) + * [ARM - 32 Bit](http://downloads.rclone.org/rclone-VERSION-netbsd-arm.zip) + * OpenBSD + * [386 - 32 Bit](http://downloads.rclone.org/rclone-VERSION-openbsd-386.zip) + * [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-VERSION-openbsd-amd64.zip) + * Plan 9 + * [386 - 32 Bit](http://downloads.rclone.org/rclone-VERSION-plan9-386.zip) + +Older downloads can be found [here](http://downloads.rclone.org/) diff --git a/docs/content/local.md b/docs/content/local.md index 0f89d3969..9b168f736 100644 --- a/docs/content/local.md +++ b/docs/content/local.md @@ -1,3 +1,9 @@ +--- +title: "Local Filesystem" +description: "Rclone docs for the local filesystem" +date: "2014-03-19" +--- + Local Filesystem ---------------- diff --git a/docs/layouts/base/navbar.html b/docs/layouts/base/navbar.html index b92255137..0e22a1423 100644 --- a/docs/layouts/base/navbar.html +++ b/docs/layouts/base/navbar.html @@ -12,12 +12,14 @@