version: support major.minor.patch tags without breaking Apple builds.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2020-06-01 20:42:34 +00:00
committed by Dave Anderson
parent 984a699219
commit 5aae6b734d
8 changed files with 167 additions and 45 deletions
+4 -17
View File
@@ -1,17 +1,4 @@
redo-ifchange short.txt
read -r ver <short.txt
# get it into "major.minor.patch" format
ver=$(echo "$ver" | sed -e 's/-/./')
# CFBundleShortVersionString: the "short name" used in the App Store.
# eg. 0.92.98
echo "VERSION_NAME = $ver" >$3
# CFBundleVersion: the build number. Needs to increment each release.
# start counting at 100 because we submitted using raw build numbers
# before (and Apple doesn't let you start over).
# eg. 100.92.98
major=$((${ver%%.*} + 100))
minor=${ver#*.}
echo "VERSION_ID = $major.$minor" >>$3
redo-ifchange mkversion.sh describe.txt
read -r describe <describe.txt
ver=$(./mkversion.sh xcode "$describe")
echo "$ver" >$3