Skip to content

Commit

Permalink
🔨 Use real revision, write brew formula before testing
Browse files Browse the repository at this point in the history
  • Loading branch information
phatblat committed Mar 10, 2024
1 parent fc4ffae commit b8803ba
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions script/brew_formula_update
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,8 @@ echo "MAS_VERSION: ${MAS_VERSION}"
if [[ -n "${2}" ]]; then
REVISION="${2}"
else
if [[ $dry_run == '-d' ]]; then
REVISION=fake-revision
else
# Derive revision from version. Fails if MAS_VERSION is not a tag.
REVISION=$(git rev-parse "${MAS_VERSION}")
fi
# Derive revision from version. Fails if MAS_VERSION is not a tag.
REVISION=$(git rev-parse "${MAS_VERSION}")
fi

echo "REVISION: ${REVISION}"
Expand All @@ -85,8 +81,6 @@ echo "REVISION: ${REVISION}"

script/version_bump "${MAS_VERSION}" "$REVISION"

# cp -v "${LOCAL_MAS_FORMULA_PATH}" "${CORE_MAS_FORMULA_PATH}"

branch_name="releases/release-${MAS_VERSION}"
$echo git branch "${branch_name}"
$echo git switch "${branch_name}"
Expand Down Expand Up @@ -124,12 +118,18 @@ brew update
# Build the formula for the current macOS version and architecture.
#

# Update mas formula in core
cp -v "${LOCAL_MAS_FORMULA_PATH}" "${CORE_MAS_FORMULA_PATH}"

# Install mas from source
# 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.
export HOMEBREW_NO_INSTALL_FROM_API=1

# Install mas from source
brew reinstall mas
HOMEBREW_NO_INSTALL_FROM_API=1 \
brew install mas \
--build-from-source \
--verbose

# Audit formula
brew audit --strict mas-cli/tap/mas
Expand Down

0 comments on commit b8803ba

Please sign in to comment.