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