🔨 Use real revision, write brew formula before testing

This commit is contained in:
Ben Chatelain 2024-03-10 11:43:13 -06:00
parent fc4ffae87f
commit b8803ba230
No known key found for this signature in database

View file

@ -68,12 +68,8 @@ echo "MAS_VERSION: ${MAS_VERSION}"
if [[ -n "${2}" ]]; then if [[ -n "${2}" ]]; then
REVISION="${2}" REVISION="${2}"
else else
if [[ $dry_run == '-d' ]]; then # Derive revision from version. Fails if MAS_VERSION is not a tag.
REVISION=fake-revision REVISION=$(git rev-parse "${MAS_VERSION}")
else
# Derive revision from version. Fails if MAS_VERSION is not a tag.
REVISION=$(git rev-parse "${MAS_VERSION}")
fi
fi fi
echo "REVISION: ${REVISION}" echo "REVISION: ${REVISION}"
@ -85,8 +81,6 @@ echo "REVISION: ${REVISION}"
script/version_bump "${MAS_VERSION}" "$REVISION" script/version_bump "${MAS_VERSION}" "$REVISION"
# cp -v "${LOCAL_MAS_FORMULA_PATH}" "${CORE_MAS_FORMULA_PATH}"
branch_name="releases/release-${MAS_VERSION}" branch_name="releases/release-${MAS_VERSION}"
$echo git branch "${branch_name}" $echo git branch "${branch_name}"
$echo git switch "${branch_name}" $echo git switch "${branch_name}"
@ -124,12 +118,18 @@ brew update
# Build the formula for the current macOS version and architecture. # Build the formula for the current macOS version and architecture.
# #
# Force brew to use the local repository instead of the API. # Update mas formula in core
# Disable API before any install, reinstall or upgrade commands. cp -v "${LOCAL_MAS_FORMULA_PATH}" "${CORE_MAS_FORMULA_PATH}"
export HOMEBREW_NO_INSTALL_FROM_API=1
# Install mas from source # Install mas from source
brew reinstall mas # HOMEBREW_NO_INSTALL_FROM_API:
# Force brew to use the local repository instead of the API.
# Disable API before any install, reinstall or upgrade commands.
HOMEBREW_NO_INSTALL_FROM_API=1 \
brew install mas \
--build-from-source \
--verbose
# Audit formula # Audit formula
brew audit --strict mas-cli/tap/mas brew audit --strict mas-cli/tap/mas