File: set_build_version.sh

package info (click to toggle)
vcmi 1.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 14,672 kB
  • sloc: cpp: 181,738; sh: 220; python: 178; ansic: 69; objc: 66; xml: 59; makefile: 34
file content (10 lines) | stat: -rwxr-xr-x 446 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env bash

today=$(date '+%Y-%m-%d')
commitShort=$(git rev-parse --short HEAD)
bundleVersion="$today-$commitShort"

/usr/libexec/PlistBuddy "$1/Info.plist" -c "Set :CFBundleVersion $bundleVersion"

/usr/libexec/PlistBuddy "$1/Settings.bundle/Root.plist" -c "Set :PreferenceSpecifiers:0:DefaultValue $MARKETING_VERSION"
/usr/libexec/PlistBuddy "$1/Settings.bundle/Root.plist" -c "Set :PreferenceSpecifiers:1:DefaultValue $bundleVersion"