/
version.go
49 lines (43 loc) · 1.56 KB
/
version.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// This code is available on the terms of the project LICENSE.md file,
// also available online at https://blueoakcouncil.org/license/1.0.0.
package main
import (
"decred.org/dcrdex/dex/version"
)
const (
// appName defines the application name.
appName string = "dexc"
)
var (
// Note for maintainers:
//
// The expected process for setting the version in releases is as follows:
// - Create a release branch of the form 'release-vMAJOR.MINOR'
// - Modify the Version variable below on that branch to:
// - Remove the pre-release portion
// - Set the build metadata to 'release.local'
// - Example: 'Version = "0.5.0+release.local"'
// - Update the Version variable below on the master branch to the next
// expected version while retaining a pre-release of 'pre'
//
// These steps ensure that building from source produces versions that are
// distinct from reproducible builds that override the Version via linker
// flags.
// Version is the application version per the semantic versioning 2.0.0 spec
// (https://semver.org/).
//
// It is defined as a variable so it can be overridden during the build
// process with:
// '-ldflags "-X main.Version=fullsemver"'
// if needed.
//
// It MUST be a full semantic version per the semantic versioning spec or
// the package will panic at runtime. Of particular note is the pre-release
// and build metadata portions MUST only contain characters from
// semanticAlphabet.
// NOTE: The Version string is overridden on init.
Version = "0.6.3+release.local"
)
func init() {
Version = version.Parse(Version)
}