diff --git a/script/bottle b/script/bottle index b6d791a..35a671a 100755 --- a/script/bottle +++ b/script/bottle @@ -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 diff --git a/script/brew_formula_update b/script/brew_formula_update index 4327406..f4e3948 100755 --- a/script/brew_formula_update +++ b/script/brew_formula_update @@ -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 \ diff --git a/script/brew_update b/script/brew_update index 02f2d46..a6ce2eb 100755 --- a/script/brew_update +++ b/script/brew_update @@ -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 diff --git a/script/build_artifacts b/script/build_artifacts index 30d384b..6414d16 100755 --- a/script/build_artifacts +++ b/script/build_artifacts @@ -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 diff --git a/script/install b/script/install index 1b72f39..f6ee7ce 100755 --- a/script/install +++ b/script/install @@ -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/" diff --git a/script/package b/script/package index 686647c..30df8f8 100755 --- a/script/package +++ b/script/package @@ -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" diff --git a/script/version b/script/version index 9bce7a8..19c7b31 100755 --- a/script/version +++ b/script/version @@ -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 <"${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}"