mirror of
https://github.com/mas-cli/mas
synced 2024-11-21 19:23:01 +00:00
🔨 Rename MAS_VERSION variable
This commit is contained in:
parent
b8dc5ff718
commit
40d3cfde0d
7 changed files with 23 additions and 23 deletions
|
@ -14,8 +14,8 @@
|
|||
|
||||
BUILD_DIR="$PWD/.build"
|
||||
BOTTLE_DIR="$BUILD_DIR/bottles"
|
||||
VERSION=$(script/version)
|
||||
ROOT_URL="https://github.com/mas-cli/mas/releases/download/v${VERSION}"
|
||||
MAS_VERSION=$(script/version)
|
||||
ROOT_URL="https://github.com/mas-cli/mas/releases/download/v${MAS_VERSION}"
|
||||
|
||||
# Supports macOS 10.11 and later
|
||||
OS_NAMES=(arm64_monterey monterey arm64_big_sur big_sur catalina mojave high_sierra sierra el_capitan)
|
||||
|
@ -58,7 +58,7 @@ fi
|
|||
echo "CURRENT_PLATFORM: ${CURRENT_PLATFORM}"
|
||||
|
||||
# Output filename from build-bottle command
|
||||
OLD_FILENAME="mas--${VERSION}.${CURRENT_PLATFORM}.bottle.tar.gz"
|
||||
OLD_FILENAME="mas--${MAS_VERSION}.${CURRENT_PLATFORM}.bottle.tar.gz"
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -87,7 +87,7 @@ brew style mas-cli/tap/mas
|
|||
# Build the formula for the current macOS version and architecture.
|
||||
#
|
||||
|
||||
echo "==> 🍼 Bottling mas ${VERSION} for: ${OS_NAMES[*]}"
|
||||
echo "==> 🍼 Bottling mas ${MAS_VERSION} for: ${OS_NAMES[*]}"
|
||||
brew install --build-bottle mas-cli/tap/mas
|
||||
|
||||
# Generate bottle do block, dropping last 2 lines
|
||||
|
@ -118,7 +118,7 @@ EOF
|
|||
|
||||
# Fix filename
|
||||
for os in "${OS_NAMES[@]}"; do
|
||||
new_filename="mas-${VERSION}.${os}.bottle.tar.gz"
|
||||
new_filename="mas-${MAS_VERSION}.${os}.bottle.tar.gz"
|
||||
cp -v "${OLD_FILENAME}" "${BOTTLE_DIR}/${new_filename}"
|
||||
|
||||
# Append each os
|
||||
|
|
|
@ -20,16 +20,16 @@ function usage {
|
|||
|
||||
# arg 1 - version tag
|
||||
if test -n "$1"; then
|
||||
VERSION="$1"
|
||||
MAS_VERSION="$1"
|
||||
else
|
||||
VERSION="v$(script/version)"
|
||||
MAS_VERSION="v$(script/version)"
|
||||
fi
|
||||
|
||||
# arg 2 - revision (commit hash)
|
||||
if test -n "$2"; then
|
||||
REVISION="$2"
|
||||
else
|
||||
REVISION=$(git rev-parse "$VERSION")
|
||||
REVISION=$(git rev-parse "$MAS_VERSION")
|
||||
fi
|
||||
|
||||
echo "Checking to see if this update can be a simple bump."
|
||||
|
@ -44,11 +44,11 @@ if test $status -ne 0; then
|
|||
formula_revisions=1
|
||||
fi
|
||||
|
||||
echo "==> 🧪 Updating homebrew-core formula mas ($VERSION, $REVISION)"
|
||||
echo "==> 🧪 Updating homebrew-core formula mas ($MAS_VERSION, $REVISION)"
|
||||
|
||||
echo "Validating formula"
|
||||
brew bump-formula-pr \
|
||||
--tag="$VERSION" \
|
||||
--tag="$MAS_VERSION" \
|
||||
--revision="$REVISION" \
|
||||
--strict \
|
||||
mas
|
||||
|
@ -69,7 +69,7 @@ if test $formula_revisions -eq 1; then
|
|||
fi
|
||||
|
||||
brew bump-formula-pr \
|
||||
--tag="$VERSION" \
|
||||
--tag="$MAS_VERSION" \
|
||||
--revision="$REVISION" \
|
||||
--strict \
|
||||
--verbose \
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# Runs all related scripts for generating all artifacts.
|
||||
#
|
||||
|
||||
VERSION=$(script/version)
|
||||
MAS_VERSION=$(script/version)
|
||||
|
||||
echo "Updating mas $VERSION Homebrew formula"
|
||||
echo "Updating mas $MAS_VERSION Homebrew formula"
|
||||
|
||||
script/brew_formula_update
|
||||
script/bottle
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# Runs all related scripts for generating all artifacts.
|
||||
#
|
||||
|
||||
VERSION=$(script/version)
|
||||
MAS_VERSION=$(script/version)
|
||||
|
||||
echo "Building mas $VERSION artifacts"
|
||||
echo "Building mas $MAS_VERSION artifacts"
|
||||
|
||||
script/clean
|
||||
script/build --universal
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
ARCH=$(uname -m)
|
||||
RELEASE=.build/${ARCH}-apple-macosx/release
|
||||
VERSION=$(script/version)
|
||||
MAS_VERSION=$(script/version)
|
||||
|
||||
if [[ $(uname -m) == 'arm64' ]]; then
|
||||
PREFIX=/opt/homebrew
|
||||
|
@ -32,7 +32,7 @@ while test -n "$1"; do
|
|||
shift
|
||||
done
|
||||
|
||||
echo "==> 📲 Installing mas ($VERSION) for $ARCH to $PREFIX"
|
||||
echo "==> 📲 Installing mas ($MAS_VERSION) for $ARCH to $PREFIX"
|
||||
ditto -v \
|
||||
"$RELEASE/mas" \
|
||||
"$PREFIX/bin/"
|
||||
|
|
|
@ -20,7 +20,7 @@ DISTRIBUTION_PLIST="Package/Distribution.plist"
|
|||
DSTROOT=.build/distributions
|
||||
script/install "$DSTROOT/usr/local" --universal
|
||||
|
||||
VERSION=$(script/version)
|
||||
MAS_VERSION=$(script/version)
|
||||
|
||||
echo "==> 📦 Assemble an installer package"
|
||||
|
||||
|
@ -28,7 +28,7 @@ echo "==> 📦 Assemble an installer package"
|
|||
pkgbuild \
|
||||
--identifier "$IDENTIFIER" \
|
||||
--install-location "/" \
|
||||
--version "$VERSION" \
|
||||
--version "$MAS_VERSION" \
|
||||
--root "$DSTROOT" \
|
||||
"$COMPONENT_PACKAGE"
|
||||
|
||||
|
|
|
@ -9,16 +9,16 @@
|
|||
# This no longer works with MARKETING_VERSION build setting in Info.plist
|
||||
# agvtool what-marketing-version -terse1
|
||||
|
||||
VERSION=$(git describe --abbrev=0 --tags)
|
||||
VERSION=${VERSION#v}
|
||||
MAS_VERSION=$(git describe --abbrev=0 --tags)
|
||||
MAS_VERSION=${MAS_VERSION#v}
|
||||
|
||||
SCRIPT_PATH=$(dirname "$(which "$0")")
|
||||
|
||||
cat <<EOF >"${SCRIPT_PATH}/../Sources/MasKit/Package.swift"
|
||||
// Generated by: script/version
|
||||
enum Package {
|
||||
static let version = "${VERSION}"
|
||||
static let version = "${MAS_VERSION}"
|
||||
}
|
||||
EOF
|
||||
|
||||
echo "${VERSION}"
|
||||
echo "${MAS_VERSION}"
|
||||
|
|
Loading…
Reference in a new issue