Skip to content

Commit

Permalink
Version v0.96 - automate the release process
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Apr 25, 2014
1 parent a81ae3c commit 365dc2f
Show file tree
Hide file tree
Showing 13 changed files with 203 additions and 28 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ rclone
rclonetest/rclonetest
build
docs/public
README.html
README.txt
rclone.1
51 changes: 45 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)

37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
% rclone(1) User Manual
% Nick Craig-Wood
% Apr 24, 2014

Rclone
======

Expand Down Expand Up @@ -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`.

Expand Down Expand Up @@ -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
-------------------

Expand Down
35 changes: 20 additions & 15 deletions cross-compile
Original file line number Diff line number Diff line change
@@ -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

rm -rf build

gox -output "build/{{.OS}}/{{.Arch}}/{{.Dir}}"
if [ "$1" == "" ]; then
echo "Syntax: $0 Version"
exit 1
fi
VERSION="$1"

cat <<'#EOF' > build/README.txt
This directory contains builds of the rclone program.
Rclone is a program to transfer files to and from cloud storage
systems such as Google Drive, Amazon S3 and Swift (Rackspace
Cloudfiles).
rm -rf build

See the project website here: https://github.com/ncw/rclone for more
details.
gox -output "build/{{.Dir}}-${VERSION}-{{.OS}}-{{.Arch}}/{{.Dir}}"

The files in this directory are organised by OS and processor type
mv build/rclone-${VERSION}-darwin-amd64 build/rclone-${VERSION}-osx-amd64
mv build/rclone-${VERSION}-darwin-386 build/rclone-${VERSION}-osx-386

#EOF
cd build

mv build/darwin build/osx
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

( cd build ; tree . >> README.txt )
cd ..
2 changes: 1 addition & 1 deletion docs/content/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ Links
* [Home page](http://rclone.org/)
* [Github project page for source and more instructions](http://github.com/ncw/rclone)
* <a href="https://plus.google.com/110609214444437761115" rel="publisher">Google+ page</a></li>
* [Downloads](http://www.craig-wood.com/nick/pub/rclone/)
* [Downloads](/downloads/)

rclone is brought to you by <a href="http://www.craig-wood.com/nick/">Nick Craig-Wood</a> <img src="http://www.craig-wood.com/nick/small/njcw.jpg" />
2 changes: 1 addition & 1 deletion docs/content/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
35 changes: 35 additions & 0 deletions docs/content/downloads.md
Original file line number Diff line number Diff line change
@@ -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/)
35 changes: 35 additions & 0 deletions docs/content/downloads.md.in
Original file line number Diff line number Diff line change
@@ -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/)
6 changes: 6 additions & 0 deletions docs/content/local.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: "Local Filesystem"
description: "Rclone docs for the local filesystem"
date: "2014-03-19"
---

Local Filesystem
----------------

Expand Down
2 changes: 2 additions & 0 deletions docs/layouts/base/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="/">Home</a></li>
<li><a href="/downloads/">Downloads</a></li>
<li><a href="/docs/">Docs</a></li>
<li><a href="/contact/">Contact</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/">About</a></li>
<li><a href="/downloads/">Downloads</a></li>
<li><a href="/docs/">Docs</a></li>
<li class="divider"></li>
<li class="dropdown-header">Storage systems</li>
Expand Down
19 changes: 19 additions & 0 deletions notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,22 @@ s3

Bugs
* Non verbose - not sure number transferred got counted up? CHECK

Making a release
* go build ./...
* cd rclonetest
* go build
* ./rclonetest memstore:
* ./rclonetest s3:
* ./rclonetest drive2:
* ./rclonetest /tmp/z
* cd ..
* make tag
* edit README.md Changelog
* git commit version.go rclonetest/version.go README.md docs/content/downloads.md
* make retag
* . ~/bin/go-cross
* make cross
* make upload
* make upload_website
* git push --tags
2 changes: 1 addition & 1 deletion rclonetest/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const Version = "v0.95"
const Version = "v0.96"
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const Version = "v0.95"
const Version = "v0.96"

0 comments on commit 365dc2f

Please sign in to comment.