Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

build: change beta numbering to be semver compatible - Fixes #4516

Nick Craig-Woode54ce35019be
diff --git a/Makefile b/Makefile
index c150fadc3..832a61ed7 100644
--- a/Makefile
+++ b/Makefile
@@ -7,24 +7,26 @@ RELEASE_TAG := $(shell git tag -l --points-at HEAD)
VERSION := $(shell cat VERSION)
# Last tag on this branch
LAST_TAG := $(shell git describe --tags --abbrev=0)
+# Next version
+NEXT_VERSION := $(shell echo $(VERSION) | perl -lpe 's/v//; $$_ += 0.01; $$_ = sprintf("v%.2f.0", $$_)')
# If we are working on a release, override branch to master
ifdef RELEASE_TAG
BRANCH := master
+ LAST_TAG := $(shell git describe --abbrev=0 --tags $(VERSION)^)
endif
-TAG_BRANCH := -$(BRANCH)
-BRANCH_PATH := branch/
+TAG_BRANCH := .$(BRANCH)
+BRANCH_PATH := branch/$(BRANCH)/
# If building HEAD or master then unset TAG_BRANCH and BRANCH_PATH
ifeq ($(subst HEAD,,$(subst master,,$(BRANCH))),)
TAG_BRANCH :=
BRANCH_PATH :=
endif
-# Make version suffix -DDD-gCCCCCCCC (D=commits since last relase, C=Commit) or blank
-VERSION_SUFFIX := $(shell git describe --abbrev=8 --tags | perl -lpe 's/^v\d+\.\d+\.\d+//; s/^-(\d+)/"-".sprintf("%03d",$$1)/e;')
-# TAG is current version + number of commits since last release + branch
+# Make version suffix -beta.NNNN.CCCCCCCC (N=Commit number, C=Commit)
+VERSION_SUFFIX := -beta.$(shell git rev-list --count HEAD).$(shell git show --no-patch --no-notes --pretty='%h' HEAD)
+# TAG is current version + commit number + commit + branch
TAG := $(VERSION)$(VERSION_SUFFIX)$(TAG_BRANCH)
-NEXT_VERSION := $(shell echo $(VERSION) | perl -lpe 's/v//; $$_ += 0.01; $$_ = sprintf("v%.2f.0", $$_)')
-ifndef RELEASE_TAG
- TAG := $(TAG)-beta
+ifdef RELEASE_TAG
+ TAG := $(RELEASE_TAG)
endif
GO_VERSION := $(shell go version)
ifdef BETA_SUBDIR
@@ -56,7 +58,6 @@ vars:
@echo BRANCH="'$(BRANCH)'"
@echo TAG="'$(TAG)'"
@echo VERSION="'$(VERSION)'"
- @echo NEXT_VERSION="'$(NEXT_VERSION)'"
@echo GO_VERSION="'$(GO_VERSION)'"
@echo BETA_URL="'$(BETA_URL)'"
@@ -220,25 +221,24 @@ fetch_binaries:
serve: website
cd docs && hugo server -v -w --disableFastRender
-tag: doc
- @echo "Old tag is $(VERSION)"
- @echo "New tag is $(NEXT_VERSION)"
- echo -e "package fs\n\n// Version of rclone\nvar Version = \"$(NEXT_VERSION)\"\n" | gofmt > fs/version.go
- echo -n "$(NEXT_VERSION)" > docs/layouts/partials/version.html
- echo "$(NEXT_VERSION)" > VERSION
- git tag -s -m "Version $(NEXT_VERSION)" $(NEXT_VERSION)
- bin/make_changelog.py $(LAST_TAG) $(NEXT_VERSION) > docs/content/changelog.md.new
+tag: retag doc
+ bin/make_changelog.py $(LAST_TAG) $(VERSION) > docs/content/changelog.md.new
mv docs/content/changelog.md.new docs/content/changelog.md
@echo "Edit the new changelog in docs/content/changelog.md"
@echo "Then commit all the changes"
- @echo git commit -m \"Version $(NEXT_VERSION)\" -a -v
+ @echo git commit -m \"Version $(VERSION)\" -a -v
@echo "And finally run make retag before make cross etc"
retag:
+ @echo "Version is $(VERSION)"
git tag -f -s -m "Version $(VERSION)" $(VERSION)
startdev:
- echo -e "package fs\n\n// Version of rclone\nvar Version = \"$(VERSION)-DEV\"\n" | gofmt > fs/version.go
+ @echo "Version is $(VERSION)"
+ @echo "Next version is $(NEXT_VERSION)"
+ echo -e "package fs\n\n// Version of rclone\nvar Version = \"$(NEXT_VERSION)-DEV\"\n" | gofmt > fs/version.go
+ echo -n "$(NEXT_VERSION)" > docs/layouts/partials/version.html
+ echo "$(NEXT_VERSION)" > VERSION
git commit -m "Start $(VERSION)-DEV development" fs/version.go
winzip:
diff --git a/RELEASE.md b/RELEASE.md
index 57bcef32f..eeb4d05aa 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -69,6 +69,8 @@ this will be done already.
Now
+ * FIXME this is now broken with new semver layout - needs fixing
+ * FIXME the TAG=${NEW_TAG} shouldn't be necessary any more
* git co ${BASE_TAG}-stable
* git cherry-pick any fixes
* Test (see above)
diff --git a/VERSION b/VERSION
index 5c77185a7..55274d266 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-v1.52.3
+v1.53.0
diff --git a/docs/content/downloads.md b/docs/content/downloads.md
index 5537cc0b1..43b42f38b 100644
--- a/docs/content/downloads.md
+++ b/docs/content/downloads.md
@@ -38,16 +38,25 @@ Beta releases
[Beta releases](https://beta.rclone.org) are generated from each commit
to master. Note these are named like
- {Version Tag}-{Commit Number}-g{Git Commit Hash}
+ {Version Tag}.beta.{Commit Number}.{Git Commit Hash}
-You can match the `Git Commit Hash` up with the [git
-log](https://github.com/rclone/rclone/commits/master). The most recent
-release will have the largest `Version Tag` and `Commit Number` and
-will normally be at the end of the list.
+eg
+
+ v1.53.0-beta.4677.b657a2204
+
+The `Version Tag` is the version that the beta release will become
+when it is released. You can match the `Git Commit Hash` up with the
+[git log](https://github.com/rclone/rclone/commits/master). The most
+recent release will have the largest `Version Tag` and `Commit Number`
+and will normally be at the end of the list.
Some beta releases may have a branch name also:
- {Version Tag}-{Commit Number}-g{Git Commit Hash}-{Branch Name}
+ {Version Tag}-beta.{Commit Number}.{Git Commit Hash}.{Branch Name}
+
+eg
+
+ v1.53.0-beta.4677.b657a2204.semver
The presence of `Branch Name` indicates that this is a feature under
development which will at some point be merged into the normal betas
diff --git a/docs/layouts/partials/version.html b/docs/layouts/partials/version.html
index 00c9d1281..55274d266 100644
--- a/docs/layouts/partials/version.html
+++ b/docs/layouts/partials/version.html
@@ -1 +1 @@
-v1.52.0
\ No newline at end of file
+v1.53.0