diff options
author | C. Brown <hackdom@majoolr.io> | 2019-05-08 21:44:28 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-05-08 21:44:28 +0800 |
commit | be4d74f8d22e573d37a4bf4514aa4320cb62a75d (patch) | |
tree | d451cb8c7c0fb3d91866d933d0038150f951a50f /cmd/swarm | |
parent | c113723fdb9d9fa4c8ac57777f9aecfe97391453 (diff) | |
download | go-tangerine-be4d74f8d22e573d37a4bf4514aa4320cb62a75d.tar go-tangerine-be4d74f8d22e573d37a4bf4514aa4320cb62a75d.tar.gz go-tangerine-be4d74f8d22e573d37a4bf4514aa4320cb62a75d.tar.bz2 go-tangerine-be4d74f8d22e573d37a4bf4514aa4320cb62a75d.tar.lz go-tangerine-be4d74f8d22e573d37a4bf4514aa4320cb62a75d.tar.xz go-tangerine-be4d74f8d22e573d37a4bf4514aa4320cb62a75d.tar.zst go-tangerine-be4d74f8d22e573d37a4bf4514aa4320cb62a75d.zip |
cmd, internal/build, docker: advertise commit date in unstable build versions (#19522)
* add-date-to unstable
* fields-insteadof-split
* internal/build: support building with missing git
* docker: add git history back to support commit date in version
* internal/build: use PR commits hashes for PR builds
Diffstat (limited to 'cmd/swarm')
-rw-r--r-- | cmd/swarm/global-store/main.go | 4 | ||||
-rw-r--r-- | cmd/swarm/main.go | 2 | ||||
-rw-r--r-- | cmd/swarm/swarm-snapshot/main.go | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/cmd/swarm/global-store/main.go b/cmd/swarm/global-store/main.go index 52fafc8f6..58505f988 100644 --- a/cmd/swarm/global-store/main.go +++ b/cmd/swarm/global-store/main.go @@ -26,6 +26,7 @@ import ( var ( version = "0.1" gitCommit string // Git SHA1 commit hash of the release (set via linker flags) + gitDate string ) func main() { @@ -45,6 +46,9 @@ func newApp() (app *cli.App) { if len(gitCommit) >= 8 { app.Version += "-" + gitCommit[:8] } + if gitDate != "" { + app.Version += "-" + gitDate + } app.Usage = "Swarm Global Store" // app flags (for all commands) diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index a4041eb3d..f4c1dd688 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -102,7 +102,7 @@ func init() { utils.ListenPortFlag.Value = 30399 } -var app = utils.NewApp("", "Ethereum Swarm") +var app = utils.NewApp("", "", "Ethereum Swarm") // This init function creates the cli.App. func init() { diff --git a/cmd/swarm/swarm-snapshot/main.go b/cmd/swarm/swarm-snapshot/main.go index 136295e51..4a1e8b4f5 100644 --- a/cmd/swarm/swarm-snapshot/main.go +++ b/cmd/swarm/swarm-snapshot/main.go @@ -25,6 +25,7 @@ import ( ) var gitCommit string // Git SHA1 commit hash of the release (set via linker flags) +var gitDate string // default value for "create" command --nodes flag const defaultNodes = 8 @@ -40,7 +41,7 @@ func main() { // newApp construct a new instance of Swarm Snapshot Utility. // Method Run is called on it in the main function and in tests. func newApp() (app *cli.App) { - app = utils.NewApp(gitCommit, "Swarm Snapshot Utility") + app = utils.NewApp(gitCommit, gitDate, "Swarm Snapshot Utility") app.Name = "swarm-snapshot" app.Usage = "" |