mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 09:04:52 +01:00
Configurable version suffix independent of version number
This commit is contained in:
parent
4f0ddb60e7
commit
ce168ecac2
8
Makefile
8
Makefile
@ -245,18 +245,18 @@ retag:
|
||||
startdev:
|
||||
@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 -e "package fs\n\n// VersionTag of rclone\nvar VersionTag = \"$(NEXT_VERSION)\"\n" | gofmt > fs/versiontag.go
|
||||
echo -n "$(NEXT_VERSION)" > docs/layouts/partials/version.html
|
||||
echo "$(NEXT_VERSION)" > VERSION
|
||||
git commit -m "Start $(NEXT_VERSION)-DEV development" fs/version.go VERSION docs/layouts/partials/version.html
|
||||
git commit -m "Start $(NEXT_VERSION)-DEV development" fs/versiontag.go VERSION docs/layouts/partials/version.html
|
||||
|
||||
startstable:
|
||||
@echo "Version is $(VERSION)"
|
||||
@echo "Next stable version is $(NEXT_PATCH_VERSION)"
|
||||
echo -e "package fs\n\n// Version of rclone\nvar Version = \"$(NEXT_PATCH_VERSION)-DEV\"\n" | gofmt > fs/version.go
|
||||
echo -e "package fs\n\n// VersionTag of rclone\nvar VersionTag = \"$(NEXT_PATCH_VERSION)\"\n" | gofmt > fs/versiontag.go
|
||||
echo -n "$(NEXT_PATCH_VERSION)" > docs/layouts/partials/version.html
|
||||
echo "$(NEXT_PATCH_VERSION)" > VERSION
|
||||
git commit -m "Start $(NEXT_PATCH_VERSION)-DEV development" fs/version.go VERSION docs/layouts/partials/version.html
|
||||
git commit -m "Start $(NEXT_PATCH_VERSION)-DEV development" fs/versiontag.go VERSION docs/layouts/partials/version.html
|
||||
|
||||
winzip:
|
||||
zip -9 rclone-$(TAG).zip rclone.exe
|
||||
|
@ -1,4 +1,14 @@
|
||||
package fs
|
||||
|
||||
// Version of rclone
|
||||
var Version = "v1.59.0-DEV"
|
||||
// Version of rclone containing the complete version string
|
||||
var Version string
|
||||
|
||||
func init() {
|
||||
if Version == "" {
|
||||
if VersionSuffix == "" {
|
||||
Version = VersionTag
|
||||
} else {
|
||||
Version = VersionTag + "-" + VersionSuffix
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4
fs/versionsuffix.go
Normal file
4
fs/versionsuffix.go
Normal file
@ -0,0 +1,4 @@
|
||||
package fs
|
||||
|
||||
// VersionSuffix of rclone containing the pre-release label if any
|
||||
var VersionSuffix = "DEV"
|
4
fs/versiontag.go
Normal file
4
fs/versiontag.go
Normal file
@ -0,0 +1,4 @@
|
||||
package fs
|
||||
|
||||
// VersionTag of rclone
|
||||
var VersionTag = "v1.59.0"
|
Loading…
Reference in New Issue
Block a user