Skip to content

Commit bdc8485

Browse files
author
nix
committed
again reworked version string
1 parent b4a14f1 commit bdc8485

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

doc/ETCD-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ without interrupting service while adjusting the entries.
9999

100100
The program's data version is given in the release notes and also in the version string logged at program start.
101101
The full version string ("release version") is `<program version>+<data version>` (with a literal `+`).
102-
The `<program version>` is appended by a detailed git version string, if it is not a tagged release.
102+
The default version string is appended by a detailed git version string, if it differs from the release tag.
103103

104104
#### Syntax and rules
105105

src/pdns-etcd3.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,10 @@ func Main(gitVersion string) {
237237
// TODO handle arguments, f.e. 'show-defaults' standalone command
238238
log.SetPrefix(fmt.Sprintf("pdns-etcd3[%d]: ", os.Getpid()))
239239
log.SetFlags(0)
240-
releaseVersion := programVersion.String()
240+
releaseVersion := programVersion.String() + "+" + dataVersion.String()
241241
if "v"+releaseVersion != gitVersion {
242242
releaseVersion += fmt.Sprintf("[%s]", gitVersion)
243243
}
244-
releaseVersion += fmt.Sprintf("+%s", &dataVersion)
245244
log.Printf("pdns-etcd3 %s, Copyright © 2016-2022 nix <https://keybase.io/nixn>", releaseVersion)
246245
var logMessages []string
247246
reqChan := startReadRequests()

0 commit comments

Comments
 (0)