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