Skip to content

Commit

Permalink
Merge pull request #1 from Homebrew/master
Browse files Browse the repository at this point in the history
  • Loading branch information
antony downey authored Dec 30, 2021
2 parents 5659d74 + 0b14b6d commit f63c0a8
Show file tree
Hide file tree
Showing 1,185 changed files with 55,885 additions and 41,884 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: New issue for Reproducible Bug
description: "If you're sure it's reproducible and not just your machine: submit an issue so we can investigate."
labels: bug
labels: [bug]
body:
- type: markdown
attributes:
Expand All @@ -19,6 +19,7 @@ body:
required: true
- type: checkboxes
attributes:
label: Verification
description: Please verify that you've followed these steps.
options:
- label: I ran `brew update` and am still able to reproduce my issue.
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ contact_links:
about: Have a question? Not sure if your issue affects everyone reproducibly? The quickest way to get help is on Homebrew's GitHub Discussions!
- name: New issue on Homebrew/homebrew-core
url: https://github.com/Homebrew/homebrew-core/issues/new/choose
about: On macOS/Mac OS X? Having a `brew` problem with a `brew install` or `brew upgrade` of a single formula/package? Report it to Homebrew/homebrew-core (the macOS core tap/repository).
about: Having a `brew` problem with a `brew install` or `brew upgrade` of a single formula/package? Report it to Homebrew/homebrew-core (the core tap/repository).
- name: New issue on Homebrew/homebrew-cask
url: https://github.com/Homebrew/homebrew-cask/issues/new/choose
about: Having a `brew --cask` problem? Report it to Homebrew/homebrew-cask (the cask tap/repository).
- name: New issue on Homebrew/linuxbrew-core
url: https://github.com/Homebrew/linuxbrew-core/issues/new/choose
about: On Linux? Having a `brew` problem with a `brew install` or `brew upgrade` of a single formula/package? Report it to Homebrew/linuxbrew-core (the Linux core tap/repository).
- name: Get help from Homebrew mirror maintainers
url: https://github.com/Homebrew/discussions/discussions/1917
about: Slow download speed? Homebrew mirror not working as expected? Please take a look at the mirror list and contact respective mirror maintainers.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ updates:
interval: weekly
allow:
- dependency-type: all
versioning-strategy: lockfile-only

- package-ecosystem: bundler
directory: /Library/Homebrew
Expand All @@ -25,3 +26,4 @@ updates:
- dependency-type: all
ignore:
- dependency-name: sorbet-runtime
versioning-strategy: lockfile-only
5 changes: 5 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
exclude:
authors:
- dependabot
- BrewTestBot
22 changes: 12 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
release:
types:
- published
permissions:
contents: read
jobs:
ubuntu:
if: startsWith(github.repository, 'Homebrew/')
Expand All @@ -34,31 +36,31 @@ jobs:
- name: Deploy the tagged Docker image to GitHub Packages
if: startsWith(github.ref, 'refs/tags/')
run: |
brew_version=${GITHUB_REF:10}
echo "brew_version=$brew_version" >> ${GITHUB_ENV}
brew_version="${GITHUB_REF:10}"
echo "brew_version=${brew_version}" >> "${GITHUB_ENV}"
echo ${{secrets.HOMEBREW_BREW_GITHUB_PACKAGES_TOKEN}} | docker login ghcr.io -u BrewTestBot --password-stdin
docker tag brew "ghcr.io/homebrew/ubuntu${{matrix.version}}:$brew_version"
docker push "ghcr.io/homebrew/ubuntu${{matrix.version}}:$brew_version"
docker tag brew "ghcr.io/homebrew/ubuntu${{matrix.version}}:${brew_version}"
docker push "ghcr.io/homebrew/ubuntu${{matrix.version}}:${brew_version}"
docker tag brew "ghcr.io/homebrew/ubuntu${{matrix.version}}:latest"
docker push "ghcr.io/homebrew/ubuntu${{matrix.version}}:latest"
- name: Deploy the tagged Docker image to Docker Hub
if: startsWith(github.ref, 'refs/tags/')
run: |
echo ${{secrets.HOMEBREW_BREW_DOCKER_TOKEN}} | docker login -u brewtestbot --password-stdin
docker tag brew "homebrew/ubuntu${{matrix.version}}:$brew_version"
docker push "homebrew/ubuntu${{matrix.version}}:$brew_version"
docker tag brew "homebrew/ubuntu${{matrix.version}}:${brew_version}"
docker push "homebrew/ubuntu${{matrix.version}}:${brew_version}"
docker tag brew "homebrew/ubuntu${{matrix.version}}:latest"
docker push "homebrew/ubuntu${{matrix.version}}:latest"
- name: Deploy the homebrew/brew Docker image to GitHub Packages and Docker Hub
if: startsWith(github.ref, 'refs/tags/') && matrix.version == '20.04'
run: |
docker tag brew "ghcr.io/homebrew/brew:$brew_version"
docker push "ghcr.io/homebrew/brew:$brew_version"
docker tag brew "ghcr.io/homebrew/brew:${brew_version}"
docker push "ghcr.io/homebrew/brew:${brew_version}"
docker tag brew "ghcr.io/homebrew/brew:latest"
docker push "ghcr.io/homebrew/brew:latest"
docker tag brew "homebrew/brew:$brew_version"
docker push "homebrew/brew:$brew_version"
docker tag brew "homebrew/brew:${brew_version}"
docker push "homebrew/brew:${brew_version}"
docker tag brew "homebrew/brew:latest"
docker push "homebrew/brew:latest"
4 changes: 3 additions & 1 deletion .github/workflows/doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- Library/Homebrew/extend/os/diagnostic.rb
- Library/Homebrew/extend/os/mac/diagnostic.rb
- Library/Homebrew/os/mac/xcode.rb
permissions:
contents: read
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
Expand All @@ -16,7 +18,7 @@ jobs:
tests:
strategy:
matrix:
version: ["11-arm64", "11", "10.15", "10.14"]
version: ["12-arm64", "12", "11-arm64", "11", "10.15"]
fail-fast: false
runs-on: ${{ matrix.version }}
env:
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/sorbet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- cron: "0 0 * * *"
workflow_dispatch:

permissions:
contents: read

jobs:
tapioca:
if: github.repository == 'Homebrew/brew'
Expand All @@ -32,27 +35,31 @@ jobs:
- name: Update RBI files
id: update
env:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
HOMEBREW_GPG_PASSPHRASE: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }}
run: |
git fetch origin
BRANCH="sorbet-files-update"
echo "::set-output name=branch::${BRANCH}"
if git ls-remote --exit-code --heads origin "$BRANCH"; then
git checkout "$BRANCH"
if git ls-remote --exit-code --heads origin "${BRANCH}"
then
git checkout "${BRANCH}"
git reset --hard origin/master
else
git checkout -B "$BRANCH" origin/master
BRANCH_EXISTS="1"
git checkout --no-track -B "${BRANCH}" origin/master
fi
if brew typecheck --update --fail-if-not-changed; then
git add "$GITHUB_WORKSPACE/Library/Homebrew/sorbet"
if brew typecheck --update --fail-if-not-changed
then
git add "${GITHUB_WORKSPACE}/Library/Homebrew/sorbet"
git commit -m "sorbet: Update RBI files." \
-m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow."
echo "::set-output name=committed::true"
if [ -n "$BRANCH_EXISTS" ]; then
PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")"
if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]]
then
echo "::set-output name=pull_request::true"
fi
fi
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/spdx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
- master
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
jobs:
spdx:
if: github.repository == 'Homebrew/brew'
Expand All @@ -29,26 +31,30 @@ jobs:
- name: Update SPDX license data
id: update
env:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
HOMEBREW_GPG_PASSPHRASE: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }}
run: |
git fetch origin
BRANCH="spdx-update"
echo "::set-output name=branch::${BRANCH}"
if git ls-remote --exit-code --heads origin "$BRANCH"; then
git checkout "$BRANCH"
if git ls-remote --exit-code --heads origin "${BRANCH}"
then
git checkout "${BRANCH}"
git reset --hard origin/master
else
git checkout -B "$BRANCH" origin/master
BRANCH_EXISTS="1"
git checkout --no-track -B "${BRANCH}" origin/master
fi
if brew update-license-data --fail-if-not-changed; then
git add "$GITHUB_WORKSPACE/Library/Homebrew/data/spdx"
if brew update-license-data --fail-if-not-changed
then
git add "${GITHUB_WORKSPACE}/Library/Homebrew/data/spdx"
git commit -m "spdx: update license data." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/spdx.yml)."
echo "::set-output name=committed::true"
if [ -n "$BRANCH_EXISTS" ]; then
PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")"
if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]]
then
echo "::set-output name=pull_request::true"
fi
fi
Expand Down
43 changes: 25 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- master
pull_request:

permissions:
contents: read

env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
Expand Down Expand Up @@ -81,7 +84,7 @@ jobs:
- name: Run brew readall on all taps
run: brew readall --aliases

- name: Run brew style on linuxbrew-core
- name: Run brew style on homebrew-core for Linux
run: brew style --display-cop-names homebrew/core

- name: Run brew audit --skip-style on all taps
Expand All @@ -90,10 +93,10 @@ jobs:
- name: Set up all Homebrew taps
run: |
HOMEBREW_REPOSITORY="$(brew --repo)"
HOMEBREW_CORE_REPOSITORY="$HOMEBREW_REPOSITORY/Library/Taps/homebrew/homebrew-core"
git -C "$HOMEBREW_CORE_REPOSITORY" remote add homebrew_core https://github.com/Homebrew/homebrew-core
git -C "$HOMEBREW_CORE_REPOSITORY" fetch homebrew_core || git -C "$HOMEBREW_CORE_REPOSITORY" fetch homebrew_core
git -C "$HOMEBREW_CORE_REPOSITORY" checkout --force -B master homebrew_core/master
HOMEBREW_CORE_REPOSITORY="${HOMEBREW_REPOSITORY}/Library/Taps/homebrew/homebrew-core"
git -C "${HOMEBREW_CORE_REPOSITORY}" remote add homebrew_core https://github.com/Homebrew/homebrew-core
git -C "${HOMEBREW_CORE_REPOSITORY}" fetch homebrew_core || git -C "${HOMEBREW_CORE_REPOSITORY}" fetch homebrew_core
git -C "${HOMEBREW_CORE_REPOSITORY}" checkout --force -B master homebrew_core/master
brew tap homebrew/aliases
brew tap homebrew/autoupdate
Expand All @@ -111,14 +114,14 @@ jobs:
brew update-reset Library/Taps/homebrew/homebrew-bundle
# brew style doesn't like world writable directories
sudo chmod -R g-w,o-w "$HOMEBREW_REPOSITORY/Library/Taps"
sudo chmod -R g-w,o-w "${HOMEBREW_REPOSITORY}/Library/Taps"
- name: Run brew style on homebrew-core
- name: Run brew style on homebrew-core for macOS
run: brew style --display-cop-names homebrew/core
env:
HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1

- name: Run brew audit --skip-style on homebrew-core
- name: Run brew audit --skip-style on homebrew-core for macOS
run: brew audit --skip-style --except=version --tap=homebrew/core
env:
HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1
Expand Down Expand Up @@ -178,11 +181,11 @@ jobs:
- name: Deploy the Docker image to GitHub Packages and Docker Hub
if: github.ref == 'refs/heads/master'
run: |
echo ${{secrets.HOMEBREW_BREW_GITHUB_PACKAGES_TOKEN}} | \
echo ${{secrets.HOMEBREW_BREW_GITHUB_PACKAGES_TOKEN}} |
docker login ghcr.io -u BrewTestBot --password-stdin
docker tag brew "ghcr.io/homebrew/ubuntu16.04:master"
docker push "ghcr.io/homebrew/ubuntu16.04:master"
echo ${{secrets.HOMEBREW_BREW_DOCKER_TOKEN}} | \
echo ${{secrets.HOMEBREW_BREW_DOCKER_TOKEN}} |
docker login -u brewtestbot --password-stdin
docker tag brew "homebrew/ubuntu16.04:master"
docker push "homebrew/ubuntu16.04:master"
Expand Down Expand Up @@ -234,7 +237,9 @@ jobs:
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b
with:
files: Library/Homebrew/test/coverage/coverage.xml

test-default-formula-linux:
name: test default formula (Linux)
Expand Down Expand Up @@ -262,9 +267,6 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Set up Xcode
run: sudo xcode-select --switch /Applications/Xcode_12.2.app/Contents/Developer

- run: brew test-bot --only-cleanup-before

- run: brew config
Expand Down Expand Up @@ -306,6 +308,8 @@ jobs:
brew sh -c "svn --homebrew=print-path"
which svn
which svnadmin
brew install curl
which curl
- name: Create parallel test log directory
run: mkdir tests
Expand All @@ -321,9 +325,10 @@ jobs:
run: |
# Retry multiple times when using BuildPulse to detect and submit
# flakiness (because rspec-retry is disabled).
if [ -n "$HOMEBREW_BUILDPULSE_ACCESS_KEY_ID" ]; then
brew tests --online --coverage || \
brew tests --online --coverage || \
if [[ -n "${HOMEBREW_BUILDPULSE_ACCESS_KEY_ID}" ]]
then
brew tests --online --coverage ||
brew tests --online --coverage ||
brew tests --online --coverage
else
brew tests --online --coverage
Expand All @@ -339,4 +344,6 @@ jobs:

- run: brew test-bot --only-formulae --test-default-formula

- uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b
with:
files: Library/Homebrew/test/coverage/coverage.xml
18 changes: 11 additions & 7 deletions .github/workflows/triage-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- cron: "0 0 * * *"
issue_comment:

permissions:
issues: write
pull-requests: write

concurrency:
group: triage-issues
cancel-in-progress: ${{ github.event_name != 'issue_comment' }}
Expand All @@ -28,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Mark/Close Stale Issues and Pull Requests
uses: actions/stale@v3.0.19
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 21
Expand All @@ -53,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Mark/Close Stale `bump-formula-pr` and `bump-cask-pr` Pull Requests
uses: actions/stale@v3.0.19
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 2
Expand All @@ -70,10 +74,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Lock Outdated Threads
uses: dessant/lock-threads@486f7380c15596f92b724e4260e4981c68d6bde6
uses: dessant/lock-threads@e460dfeb36e731f3aeb214be6b0c9a9d9a67eda6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-lock-inactive-days: 30
issue-lock-labels: outdated
pr-lock-inactive-days: 30
pr-lock-labels: outdated
issue-inactive-days: 30
add-issue-labels: outdated
pr-inactive-days: 30
add-pr-labels: outdated
Loading

0 comments on commit f63c0a8

Please sign in to comment.