mirror of
https://github.com/mas-cli/mas
synced 2024-11-24 20:43:10 +00:00
🥅 Handle version script errors when invoked by act
| fatal: Not a valid object name HEAD | MAS_VERSION: 0.0.0
This commit is contained in:
parent
8d735e4499
commit
f7152f211d
1 changed files with 6 additions and 3 deletions
|
@ -9,8 +9,13 @@
|
|||
# This no longer works with MARKETING_VERSION build setting in Info.plist
|
||||
# agvtool what-marketing-version -terse1
|
||||
|
||||
MAS_VERSION=$(git describe --abbrev=0 --tags)
|
||||
if git describe 2>/dev/null; then
|
||||
MAS_VERSION=$(git describe --abbrev=0 --tags 2>/dev/null || true)
|
||||
else
|
||||
MAS_VERSION=0.0.0
|
||||
fi
|
||||
MAS_VERSION=${MAS_VERSION#v}
|
||||
echo "MAS_VERSION: ${MAS_VERSION}"
|
||||
|
||||
SCRIPT_PATH=$(dirname "$(which "$0")")
|
||||
|
||||
|
@ -20,5 +25,3 @@ enum Package {
|
|||
static let version = "${MAS_VERSION}"
|
||||
}
|
||||
EOF
|
||||
|
||||
echo "${MAS_VERSION}"
|
||||
|
|
Loading…
Reference in a new issue