Skip to content

Commit

Permalink
Merge branch 'Homebrew:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
imyjim authored Nov 2, 2024
2 parents 3c2f10c + 6dffecd commit 5f933d3
Show file tree
Hide file tree
Showing 3,146 changed files with 372,739 additions and 245,877 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
50 changes: 50 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// For format details, see https://aka.ms/devcontainer.json.
{
"name": "Homebrew/brew",
"image": "ghcr.io/homebrew/brew:latest",

"workspaceFolder": "/home/linuxbrew/.linuxbrew/Homebrew",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/linuxbrew/.linuxbrew/Homebrew,type=bind,consistency=cached",

"onCreateCommand": ".devcontainer/on-create-command.sh",

"customizations": {
"codespaces": {
"repositories": {
"Homebrew/homebrew-bundle": {
"permissions": {
"contents": "write"
}
},
"Homebrew/homebrew-services": {
"permissions": {
"contents": "write"
}
}
}
},
"vscode": {
// Installing all necessary extensions for vscode
// Taken from: .vscode/extensions.json
"extensions": [
"Shopify.ruby-lsp",
"sorbet.sorbet-vscode-extension",
"github.vscode-github-actions",
"anykeyh.simplecov-vscode",
"ms-azuretools.vscode-docker",
"github.vscode-pull-request-github",
"davidanson.vscode-markdownlint",
"foxundermoon.shell-format",
"timonwong.shellcheck",
"ban.spellright",
"redhat.vscode-yaml",
"koichisasada.vscode-rdbg",
"editorconfig.editorconfig"
]
}
},

"remoteEnv": {
"HOMEBREW_GITHUB_API_TOKEN": "${localEnv:GITHUB_TOKEN}"
}
}
45 changes: 45 additions & 0 deletions .devcontainer/on-create-command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
set -e

# fix permissions so Homebrew and Bundler don't complain
sudo chmod -R g-w,o-w /home/linuxbrew

# everything below is too slow to do unless prebuilding so skip it
CODESPACES_ACTION_NAME="$(jq --raw-output '.ACTION_NAME' /workspaces/.codespaces/shared/environment-variables.json)"
if [[ "${CODESPACES_ACTION_NAME}" != "createPrebuildTemplate" ]]
then
echo "Skipping slow items, not prebuilding."
exit 0
fi

# install Homebrew's development gems
brew install-bundler-gems --groups=all

# install Homebrew formulae we might need
brew install shellcheck shfmt gh gnu-tar

# cleanup any mess
brew cleanup

# actually tap homebrew/core, no longer done by default
brew tap --force homebrew/core
# tap some other repos so codespaces can be used for developing multiple taps
brew tap homebrew/bundle
brew tap homebrew/services

# install some useful development things
sudo apt-get update

apt_get_install() {
sudo apt-get install -y \
-o Dpkg::Options::=--force-confdef \
-o Dpkg::Options::=--force-confnew \
"$@"
}

apt_get_install \
openssh-server \
zsh

# Start the SSH server so that `gh cs ssh` works.
sudo service ssh start
5 changes: 0 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ trim_trailing_whitespace = true
# trailing whitespace is crucial for patches
trim_trailing_whitespace = false

[**.drawio.svg]
indent_size = unset
indent_style = unset
insert_final_newline = false

[**.md]
trim_trailing_whitespace = true
x-soft-wrap-text = true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Please fill out one of the templates on: https://github.com/Homebrew/brew/issues/new/choose or we will close it without comment.
Please fill out one of the templates on https://github.com/Homebrew/brew/issues/new/choose or we will close your issue without comment.
22 changes: 12 additions & 10 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ labels: [bug]
body:
- type: markdown
attributes:
value: Please note we will close your issue without comment if you do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
- type: textarea
attributes:
render: shell
label: "`brew config` output"
validations:
required: true
value: Please note we will close your issue without comment if you do not correctly fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
- type: textarea
attributes:
render: shell
Expand All @@ -20,12 +14,20 @@ body:
- type: checkboxes
attributes:
label: Verification
description: Please verify that you've followed these steps.
description: Please verify that you've followed these steps. If you cannot truthfully check these boxes, open a discussion at https://github.com/orgs/Homebrew/discussions instead.
options:
- label: I ran `brew update` and am still able to reproduce my issue.
- label: My "`brew doctor` output" above says `Your system is ready to brew.` and am still able to reproduce my issue.
required: true
- label: I ran `brew update` twice and am still able to reproduce my issue.
required: true
- label: I have resolved all warnings from `brew doctor` and that did not fix my problem.
- label: This issue's title and/or description do not reference a single formula e.g. `brew install wget`. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
required: true
- type: textarea
attributes:
render: shell
label: "`brew config` output"
validations:
required: true
- type: textarea
attributes:
label: What were you trying to do (and why)?
Expand Down
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ body:
- type: markdown
attributes:
value: Please note we will close your issue without comment if you do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
- type: checkboxes
attributes:
label: Verification
description: Please verify that you've followed these steps.
options:
- label: This issue's title and/or description do not reference a single formula e.g. `brew install wget`. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
required: true
- type: textarea
attributes:
label: Provide a detailed description of the proposed feature
Expand Down
17 changes: 17 additions & 0 deletions .github/actionlint-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "actionlint",
"pattern": [
{
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$",
"file": 1,
"line": 2,
"column": 3,
"message": 4,
"code": 5
}
]
}
]
}
8 changes: 8 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels: []
# Configuration variables in array of strings defined in your repository or
# organization. `null` means disabling configuration variables check.
# Empty array means no configuration variable is allowed.
config-variables:
- BREW_COMMIT_APP_ID
1 change: 1 addition & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ coverage:
status:
project:
default:
informational: true
threshold: 0.05%
patch:
default:
Expand Down
2 changes: 0 additions & 2 deletions .github/codeql/codeql-config.yml

This file was deleted.

35 changes: 34 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,48 @@ updates:
directory: /
schedule:
interval: daily
allow:
- dependency-type: all
# The actions in triage-issues.yml are updated in the Homebrew/.github repo
ignore:
- dependency-name: actions/stale
- dependency-name: dessant/lock-threads
groups:
artifacts:
patterns:
- actions/*-artifact

- package-ecosystem: bundler
directory: /Library/Homebrew
schedule:
interval: daily
allow:
- dependency-type: all
versioning-strategy: lockfile-only

- package-ecosystem: npm
directory: /
schedule:
interval: daily
allow:
- dependency-type: all

- package-ecosystem: docker
directory: /
schedule:
interval: daily
allow:
- dependency-type: all

- package-ecosystem: devcontainers
directory: /
schedule:
interval: daily
allow:
- dependency-type: all

- package-ecosystem: pip
directory: /
schedule:
interval: daily
allow:
- dependency-type: all
85 changes: 85 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: actionlint

on:
push:
branches:
- master
paths:
- '.github/workflows/*.ya?ml'
- '.github/actionlint.yaml'
pull_request:
paths:
- '.github/workflows/*.ya?ml'
- '.github/actionlint.yaml'
merge_group:

env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_ENV_HINTS: 1

defaults:
run:
shell: bash -xeuo pipefail {0}

concurrency:
group: "actionlint-${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions: {}

jobs:
workflow_syntax:
if: github.repository_owner == 'Homebrew'
runs-on: ubuntu-latest
steps:
- name: Set up Homebrew
id: setup-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Install tools
run: brew install actionlint shellcheck zizmor

- name: Set up GITHUB_WORKSPACE
env:
HOMEBREW_REPOSITORY: ${{ steps.setup-homebrew.outputs.repository-path }}
run: |
# Annotations work only relative to GITHUB_WORKSPACE
(shopt -s dotglob; rm -rf "${GITHUB_WORKSPACE:?}"/*; mv "${HOMEBREW_REPOSITORY:?}"/* "$GITHUB_WORKSPACE")
rmdir "$HOMEBREW_REPOSITORY"
ln -vs "$GITHUB_WORKSPACE" "$HOMEBREW_REPOSITORY"
echo "::add-matcher::.github/actionlint-matcher.json"
- run: zizmor --format sarif . >results.sarif

- name: Upload SARIF file
uses: actions/upload-artifact@v4
with:
name: results.sarif
path: results.sarif

- run: actionlint

upload_sarif:
needs: workflow_syntax
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Download SARIF file
uses: actions/download-artifact@v4
with:
name: results.sarif
path: results.sarif

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
category: zizmor
54 changes: 54 additions & 0 deletions .github/workflows/autogenerated-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Autogenerated files check

on:
pull_request:
paths:
- .github/workflows/autogenerated-files.yml
- README.md
- completions/**
- docs/Manpage.md
- manpages/brew.1

permissions:
contents: read

env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1

defaults:
run:
shell: bash -xeuo pipefail {0}

jobs:
autogenerated:
runs-on: ubuntu-22.04
if: github.repository == 'Homebrew/brew'
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: true

- name: Cache Bundler RubyGems
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-

- name: Check for changes to autogenerated files
id: check
run: |
if brew generate-man-completions
then
echo "This PR modifies autogenerated files!" >&2
echo "Please ensure their source files are updated and then run the following:
brew generate-man-completions" >&2
exit 1
else
exit 0
fi
Loading

0 comments on commit 5f933d3

Please sign in to comment.