mkversion
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package mkversion gets version info from git and provides a bunch ofdifferently formatted version strings that get used elsewhere in the buildsystem to embed version numbers into binaries.
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeVersionInfo¶
type VersionInfo struct {// Major is the major version number portion of Short.Majorint// Minor is the minor version number portion of Short.Minorint// Patch is the patch version number portion of Short.Patchint// Short is the short version string. See the documentation of version.Short// for possible values.Shortstring// Long is the long version string. See the documentation for version.Long// for possible values.Longstring// GitHash is the git hash of the tailscale.com Go module.GitHashstring// OtherHash is the git hash of a supplemental git repository, if any. For// example, the commit of the tailscale-android repository.OtherHashstring// Xcode is the version string that gets embedded into Xcode builds for the// Tailscale iOS app and macOS standalone (aka "macsys") app.//// It is the same as Short, but with 100 added to the major version number.// This is because Apple requires monotonically increasing version numbers,// and very early builds of Tailscale used a single incrementing integer,// which the Apple interprets as the major version number. When we switched// to the current scheme, we started the major version number at 100 (v0,// plus 100) to make the transition.Xcodestring// XcodeMacOS is the version string that gets embedded into Xcode builds for// the Tailscale macOS app store app.//// This used to be the same as Xcode, but at some point Xcode reverted to// auto-incrementing build numbers instead of using the version we embedded.// As a result, we had to alter the version scheme again, and switched to// GitHash's commit date, in the format "YYYY.DDD.HHMMSS"XcodeMacOSstring// Winres is the version string that gets embedded into Windows exe// metadata. It is of the form "x,y,z,0".Winresstring// Synology is a map of Synology DSM version to the// Tailscale numeric version that gets embedded in Synology spk// files.Synology map[int]int64// GitDate is the unix timestamp of GitHash's commit date.GitDatestring// OtherDate is the unix timestamp of OtherHash's commit date, if any.OtherDatestring// Track is the release track of this build: "stable" if the minor version// number is even, "unstable" if it's odd.Trackstring// MSIProductCodes is a map of Windows CPU architecture names to UUIDv5// hashes that uniquely identify the version of the build. These are used in// the MSI installer logic to uniquely identify particular builds.MSIProductCodes map[string]string}VersionInfo is version information extracted from a git checkout.
funcInfo¶
func Info()VersionInfo
Info constructs a VersionInfo from the current working directory and returnsit, or terminates the process via log.Fatal.
funcInfoFrom¶
func InfoFrom(dirstring) (VersionInfo,error)
InfoFrom constructs a VersionInfo from dir and returns it, or an error.
func (VersionInfo)String¶
func (vVersionInfo) String()string
String returns v's information as shell variable assignments.