mirror of
https://github.com/mas-cli/mas
synced 2024-11-25 04:50:24 +00:00
d413d8cfa1
Move MasKitTests module to masTests. Rename MasKit enum as Mas. Upgrade swift-tools-version from 5.3 to 5.6.1. swift-tools-version 5.5+ is necessary to allow test code to import executable target code, to allow MasKit library code to be moved into the mas executable. Upgrade to swift-tools-version to 5.6.1 instead of to 5.5 because they support all the same macOS versions. Standardize comments. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
29 lines
609 B
Bash
Executable file
29 lines
609 B
Bash
Executable file
#!/bin/bash -eu
|
|
#
|
|
# script/version
|
|
# mas
|
|
#
|
|
# Displays the current marketing version of mas.
|
|
#
|
|
|
|
# This no longer works with MARKETING_VERSION build setting in Info.plist
|
|
# agvtool what-marketing-version -terse1
|
|
|
|
mas_dir="$(readlink -fn "$(dirname "${BASH_SOURCE:-"${0}"}")/..")"
|
|
|
|
if ! cd -- "${mas_dir}"; then
|
|
printf $'Error: Could not cd into mas directory: %s\n' "${mas_dir}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
VERSION=$(git describe --abbrev=0 --tags)
|
|
VERSION=${VERSION#v}
|
|
|
|
cat <<EOF >"Sources/mas/Package.swift"
|
|
// Generated by: script/version
|
|
enum Package {
|
|
static let version = "${VERSION}"
|
|
}
|
|
EOF
|
|
|
|
echo "${VERSION}"
|