2014-04-24 17:11:08 +00:00
|
|
|
TAG := $(shell git describe --tags)
|
|
|
|
LAST_TAG := $(shell git describe --tags --abbrev=0)
|
2014-07-03 20:43:14 +00:00
|
|
|
NEW_TAG := $(shell echo $(LAST_TAG) | perl -lpe 's/v//; $$_ += 0.01; $$_ = sprintf("v%.2f", $$_)')
|
2014-04-24 17:11:08 +00:00
|
|
|
|
|
|
|
rclone: *.go */*.go
|
|
|
|
@go version
|
2014-03-28 22:34:13 +00:00
|
|
|
go build
|
|
|
|
|
2014-04-24 17:11:08 +00:00
|
|
|
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
|
|
|
|
|
2014-03-28 22:34:13 +00:00
|
|
|
clean:
|
2014-04-24 17:11:08 +00:00
|
|
|
go clean ./...
|
2014-03-28 22:34:13 +00:00
|
|
|
find . -name \*~ | xargs -r rm -f
|
2014-04-17 21:32:39 +00:00
|
|
|
rm -rf build docs/public
|
2014-04-24 17:11:08 +00:00
|
|
|
rm -f rclone rclonetest/rclonetest rclone.1 README.html README.txt
|
2014-03-28 22:34:13 +00:00
|
|
|
|
|
|
|
website:
|
2014-04-17 21:32:39 +00:00
|
|
|
cd docs && hugo
|
2014-03-28 22:34:13 +00:00
|
|
|
|
|
|
|
upload_website: website
|
2014-04-24 17:11:08 +00:00
|
|
|
./rclone -v sync docs/public memstore:www-rclone-org
|
2014-03-28 22:34:13 +00:00
|
|
|
|
|
|
|
upload:
|
2014-04-24 17:11:08 +00:00
|
|
|
./rclone -v copy build/ memstore:downloads-rclone-org
|
2014-03-28 22:34:13 +00:00
|
|
|
|
2014-04-24 17:11:08 +00:00
|
|
|
cross: doc
|
|
|
|
./cross-compile $(TAG)
|
2014-03-28 22:34:13 +00:00
|
|
|
|
|
|
|
serve:
|
2014-04-17 21:32:39 +00:00
|
|
|
cd docs && hugo server -v -w
|
2014-04-24 17:11:08 +00:00
|
|
|
|
|
|
|
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"
|
2014-06-26 16:57:32 +00:00
|
|
|
@echo " * $(NEW_TAG) -" `date -I`
|
2014-04-24 17:11:08 +00:00
|
|
|
@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:
|
2014-06-26 16:57:32 +00:00
|
|
|
git tag -f $(LAST_TAG)
|