mirror of
https://github.com/mas-cli/mas
synced 2024-11-24 20:43:10 +00:00
Delete script/bottle
.
Partial #638 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
parent
efb47e9ce1
commit
1acd684ab1
3 changed files with 0 additions and 122 deletions
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
|
@ -137,23 +137,6 @@ jobs:
|
|||
--revision "$(git rev-list -n 1 '${{ needs.start.outputs.mas_version }}')" \
|
||||
mas-cli/tap/mas
|
||||
|
||||
- name: 🚰 Update mas tap formula
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
DRY_RUN: ${{ needs.start.outputs.dry_run }}
|
||||
run: |
|
||||
DRY_RUN="${DRY_RUN}" \
|
||||
script/bottle
|
||||
|
||||
- name: 🚀 Upload Bottles
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
DRY_RUN: ${{ needs.start.outputs.dry_run }}
|
||||
if: ${{ needs.start.outputs.dry_run == 'false' }}
|
||||
run: |
|
||||
gh release upload '${{ needs.start.outputs.mas_version }}' \
|
||||
.build/bottles/mas-*.bottle.tar.gz
|
||||
|
||||
homebrew-core:
|
||||
runs-on: macos-15
|
||||
needs: [start, homebrew-tap]
|
||||
|
|
4
Makefile
4
Makefile
|
@ -153,10 +153,6 @@ package: build ## Packages the project.
|
|||
package-install: package ## Installs the package.
|
||||
script/package_install
|
||||
|
||||
.PHONY: bottle
|
||||
bottle: ## Builds Homebrew bottles.
|
||||
script/bottle
|
||||
|
||||
.PHONY: brew_release_validate
|
||||
brew_release_validate: ## Validates Homebrew mas formula.
|
||||
script/brew_release_validate
|
||||
|
|
101
script/bottle
101
script/bottle
|
@ -1,101 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
#
|
||||
# script/bottle
|
||||
# mas
|
||||
#
|
||||
# Builds bottles of mas Homebrew formula for custom tap:
|
||||
# https://github.com/mas-cli/homebrew-tap
|
||||
#
|
||||
# This script should be run _after_ the formula has been updated in Homebrew
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
|
||||
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
|
||||
|
||||
BOTTLE_DIR=".build/bottles"
|
||||
CORE_TAP_PATH="$(brew --repo homebrew/core)"
|
||||
version="$(script/version)"
|
||||
ROOT_URL="https://github.com/mas-cli/mas/releases/download/v${version}"
|
||||
|
||||
# Supports macOS 10.13 and later
|
||||
OS_NAMES=(
|
||||
sequoia
|
||||
arm64_sequoia
|
||||
sonoma
|
||||
arm64_sonoma
|
||||
ventura
|
||||
arm64_ventura
|
||||
monterey
|
||||
arm64_monterey
|
||||
big_sur
|
||||
arm64_big_sur
|
||||
catalina
|
||||
mojave
|
||||
high_sierra
|
||||
sierra
|
||||
el_capitan
|
||||
)
|
||||
|
||||
macos_version="$(sw_vers -productVersion)"
|
||||
case "${macos_version%%.*}" in
|
||||
15)
|
||||
CURRENT_PLATFORM=sequoia
|
||||
;;
|
||||
14)
|
||||
CURRENT_PLATFORM=sonoma
|
||||
;;
|
||||
13)
|
||||
CURRENT_PLATFORM=ventura
|
||||
;;
|
||||
12)
|
||||
CURRENT_PLATFORM=monterey
|
||||
;;
|
||||
11)
|
||||
CURRENT_PLATFORM=big_sur
|
||||
;;
|
||||
10)
|
||||
CURRENT_PLATFORM=catalina
|
||||
;;
|
||||
*)
|
||||
echo 'Unsupported macOS version. This script requires Catalina or newer.' >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Prefix platform with architecture
|
||||
if [[ "$(uname -m)" == 'arm64' ]]; then
|
||||
CURRENT_PLATFORM="arm64_${CURRENT_PLATFORM}"
|
||||
fi
|
||||
|
||||
echo "==> 🍼 Bottling mas ${version} on ${CURRENT_PLATFORM} for ${OS_NAMES[*]}"
|
||||
brew install --build-bottle mas-cli/tap/mas
|
||||
|
||||
# Generate bottle do block, dropping last 2 lines
|
||||
brew bottle --verbose --no-rebuild --root-url="${ROOT_URL}" mas-cli/tap/mas
|
||||
|
||||
# Output filename from brew bottle
|
||||
generated_bottle_filename="mas--${version}.${CURRENT_PLATFORM}.bottle.tar.gz"
|
||||
|
||||
if [[ ! -e "${generated_bottle_filename}" ]]; then
|
||||
echo "Bottle not found: ${generated_bottle_filename}" >&2
|
||||
echo 'If an old version is showing in the log and filename, then make sure the formula has been updated in:' >&2
|
||||
echo "${CORE_TAP_PATH}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "${BOTTLE_DIR}"
|
||||
|
||||
for os in "${OS_NAMES[@]}"; do
|
||||
cp -v "${generated_bottle_filename}" "${BOTTLE_DIR}/mas-${version}.${os}.bottle.tar.gz"
|
||||
done
|
||||
|
||||
rm "${generated_bottle_filename}"
|
Loading…
Reference in a new issue