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