version: don't have a third version number form for xcode
Our primary version format is git describe --long --abbrev=9.
Our Apple scheme is:
(major+100).minor.(patch*10,000+gitDescribeCommits).
This CL gets rid of the third, which was:
major.minor.(patch*10,000+gitDescribeCommits).
Now the "About" box in the macOS app shows the same version that we
show on pkgs.tailscale.com, userz, changelog, etc.
This will be more important once/if we get standalone DMG downloads
for macOS on pkgs.tailscale.com.
Fixes tailscale/corp#364
This commit is contained in:
committed by
Brad Fitzpatrick
parent
0d481030f3
commit
5280d039c4
+10
-2
@@ -61,6 +61,14 @@ xcode() {
|
||||
patch=$(echo "$ver" | cut -f3 -d.)
|
||||
changecount=$(echo "$ver" | cut -f4 -d.)
|
||||
|
||||
# name should be like git-describe, but without the git suffix or
|
||||
# the leading v. For example, for git-describe of
|
||||
# "v0.100.0-15-gce1b52bb7" we want:
|
||||
#
|
||||
# VERSION_NAME = 0.100.0-15
|
||||
# VERSION_ID = 100.100.15
|
||||
name=$(echo "$describe" | sed -e 's/^v//' | sed -e 's/-g.*//' | sed -e 's/-0$//')
|
||||
|
||||
# Apple version numbers must be major.minor.patch. We have 4 fields
|
||||
# because we need major.minor.patch for go module compatibility, and
|
||||
# changecount for automatic version numbering of unstable builds. To
|
||||
@@ -68,8 +76,8 @@ xcode() {
|
||||
patch=$((patch*10000 + changecount))
|
||||
|
||||
# CFBundleShortVersionString: the "short name" used in the App Store.
|
||||
# eg. 0.92.98
|
||||
echo "VERSION_NAME = $major.$minor.$patch"
|
||||
# e.g. 0.92.98
|
||||
echo "VERSION_NAME = \"$name\""
|
||||
# CFBundleVersion: the build number. Needs to be 3 numeric sections
|
||||
# that increment for each release according to SemVer rules.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user