diff --git a/.github/workflows/PR-powershell-lts.yml b/.github/workflows/PR-powershell-lts.yml deleted file mode 100644 index de848fce..00000000 --- a/.github/workflows/PR-powershell-lts.yml +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -name: PowerShell LTS PR - -permissions: read-all - -on: - push: - paths: - - '.github/workflows/PR-powershell-lts.yml' - - 'Formula/powershell-lts.rb' - branches: - - master - pull_request: - -defaults: - run: - shell: pwsh -env: - FORMULA_PATH: ./Formula/powershell-lts.rb - UPDATE_SCRIPT_PATH: ./scripts/Upgrade-Formula.ps1 - FORMULA_NAME: powershell-lts - CHANNEL_NAME: lts - HOMEBREW_NO_ENV_HINTS: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - -jobs: - changes: - if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell' - name: Change Detection - runs-on: ubuntu-latest - # Required permissions - permissions: - pull-requests: read - # Set job outputs to values from filter step - outputs: - workflows: ${{ steps.filter.outputs.workflows }} - steps: - - name: checkout - uses: actions/checkout@v4.2.2 - - # For pull requests it's not necessary to checkout the code - - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0 - id: filter - with: - list-files: json - filters: | - workflows: - - '.github/workflows/PR-powershell-lts.yml' - - 'Formula/powershell-lts.rb' - - - name: Capture outputs - run: | - "workflows: ${{ steps.filter.outputs.workflows }}" - shell: pwsh - - homebrew-formula-lts: - timeout-minutes: 15 - needs: changes - if: ${{ needs.changes.outputs.workflows == 'true' }} - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4.2.2 - - - name: Prepare Agent - uses: ./.github/workflows/composite/prep - - - name: Install and Test Formula - uses: ./.github/workflows/composite/installAndTest - - ready_to_merge: - name: LTS ready to merge - needs: - - homebrew-formula-lts - - changes - if: always() - uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0 - with: - needs_context: ${{ toJson(needs) }} diff --git a/.github/workflows/PR-powershell-preview.yml b/.github/workflows/PR-powershell-preview.yml deleted file mode 100644 index c55d5e6a..00000000 --- a/.github/workflows/PR-powershell-preview.yml +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -name: PowerShell preview PR - -permissions: read-all - -on: - push: - paths: - - '.github/workflows/PR-powershell-preview.yml' - - 'Formula/powershell-preview.rb' - branches: - - master - pull_request: - -defaults: - run: - shell: pwsh -env: - FORMULA_PATH: ./Formula/powershell-preview.rb - UPDATE_SCRIPT_PATH: ./scripts/Upgrade-Formula.ps1 - FORMULA_NAME: powershell-preview - CHANNEL_NAME: preview - HOMEBREW_NO_ENV_HINTS: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - -jobs: - changes: - if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell' - name: Change Detection - runs-on: ubuntu-latest - # Required permissions - permissions: - pull-requests: read - # Set job outputs to values from filter step - outputs: - workflows: ${{ steps.filter.outputs.workflows }} - steps: - - name: checkout - uses: actions/checkout@v4.2.2 - - # For pull requests it's not necessary to checkout the code - - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0 - id: filter - with: - list-files: json - filters: | - workflows: - - '.github/workflows/PR-powershell-preview.yml' - - 'Formula/powershell-preview.rb' - - - name: Capture outputs - run: | - "workflows: ${{ steps.filter.outputs.workflows }}" - shell: pwsh - - homebrew-formula-preview: - timeout-minutes: 15 - needs: changes - if: ${{ needs.changes.outputs.workflows == 'true' }} - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4.2.2 - - - name: Check for applicable files - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 - id: filter - with: - filters: | - workflows: - - .github/workflows/PR-powershell-preview.yml - - Formula/powershell-preview.rb - - - name: Prepare Agent - if: steps.filter.outputs.workflows == 'true' - uses: ./.github/workflows/composite/prep - - - name: Install and Test Formula - if: steps.filter.outputs.workflows == 'true' - uses: ./.github/workflows/composite/installAndTest - - ready_to_merge: - name: Preview ready to merge - needs: - - homebrew-formula-preview - - changes - if: always() - uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0 - with: - needs_context: ${{ toJson(needs) }} diff --git a/.github/workflows/PR-powershell.yml b/.github/workflows/PR-powershell.yml deleted file mode 100644 index 294ca1b0..00000000 --- a/.github/workflows/PR-powershell.yml +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -name: PowerShell Formula PR - -permissions: read-all - -on: - workflow_dispatch: - push: - paths: - - '.github/workflows/PR-powershell.yml' - - 'Formula/powershell.rb' - branches: - - master - pull_request: - -defaults: - run: - shell: pwsh - -env: - FORMULA_PATH: ./Formula/powershell.rb - UPDATE_SCRIPT_PATH: ./scripts/Upgrade-Formula.ps1 - FORMULA_NAME: powershell - CHANNEL_NAME: stable - HOMEBREW_NO_ENV_HINTS: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - -jobs: - changes: - if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell' - name: Change Detection - runs-on: ubuntu-latest - # Required permissions - permissions: - pull-requests: read - # Set job outputs to values from filter step - outputs: - workflows: ${{ steps.filter.outputs.workflows }} - steps: - - name: checkout - uses: actions/checkout@v4.2.2 - - # For pull requests it's not necessary to checkout the code - - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0 - id: filter - with: - list-files: json - filters: | - workflows: - - '.github/workflows/PR-powershell.yml' - - 'Formula/powershell.rb' - - - name: Capture outputs - run: | - "workflows: ${{ steps.filter.outputs.workflows }}" - shell: pwsh - - homebrew-formula-stable: - timeout-minutes: 15 - needs: changes - if: ${{ needs.changes.outputs.workflows == 'true' }} - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4.2.2 - - - name: Check for applicable files - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 - id: filter - with: - filters: | - workflows: - - '.github/workflows/PR-powershell.yml' - - 'Formula/powershell.rb' - - - name: Prepare Agent - if: steps.filter.outputs.workflows == 'true' - uses: ./.github/workflows/composite/prep - - - name: Uninstall PowerShell - if: steps.filter.outputs.workflows == 'true' - shell: bash - run: | - cd / - PKG_ID='com.microsoft.powershell' - pkgutil --only-files --files ${PKG_ID} | awk '!/\.app/' | tr '\n' '\0' | xargs -n 1 -0 -p sudo rm - sudo pkgutil --forget ${PKG_ID} - - - name: Install and Test Formula - if: steps.filter.outputs.workflows == 'true' - uses: ./.github/workflows/composite/installAndTest - - ready_to_merge: - name: Stable ready to merge - needs: - - homebrew-formula-stable - - changes - if: always() - uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0 - with: - needs_context: ${{ toJson(needs) }} diff --git a/.github/workflows/composite/createPR/action.yml b/.github/workflows/composite/createPR/action.yml deleted file mode 100644 index c9612bbd..00000000 --- a/.github/workflows/composite/createPR/action.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -name: "Create PR" - -description: "Create PR" - -inputs: - token: - description: Token used to create PR - -runs: - using: "composite" - steps: - - name: (scheduled-auto-release) Create Pull Request - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - id: cpr - uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4.2.3 - with: - commit-message: "Update ${{ env.FORMULA_NAME}} formula to version ${{ env.NEW_FORMULA_VERSION }}" - token: ${{ inputs.token }} - committer: PwshBot - author: PwshBot - title: "Update ${{ env.FORMULA_NAME }} formula to version ${{ env.NEW_FORMULA_VERSION }}" - base: master - draft: false - branch: powershell-${{ env.CHANNEL_NAME }}-patch - push-to-fork: pwshBot/Homebrew-Tap diff --git a/.github/workflows/composite/installAndTest/action.yml b/.github/workflows/composite/installAndTest/action.yml deleted file mode 100644 index d69afe65..00000000 --- a/.github/workflows/composite/installAndTest/action.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -name: "install and test" - -description: "Install and test formula" - -runs: - using: "composite" - steps: - - name: brew install (Verify install of formula) - shell: bash - run: | - brew install --verbose --formula $FORMULA_NAME - - # See https://docs.brew.sh/Formula-Cookbook#audit-the-formula - - name: brew style - if: github.event_name != 'schedule' - run: | - brew style $env:FORMULA_PATH - shell: pwsh - - # We are skipping `installed` because of the following error: - # Broken dependencies: - # Error: 1 problem in 1 formula detected - # /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (openssl) - # /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (openssl) - # /Users/runner/work/Homebrew-Tap/Homebrew-Tap/Formula/powershell.rb: * powershell has broken dynamic library links: - - # We are skipping `version` because of the following error: - # Broken dependencies: - # /Users/runner/work/Homebrew-Tap/Homebrew-Tap/Formula/powershell-preview.rb: * Stable: version 7.2.0-rc.1 is redundant with version scanned from URL - # Error: 1 problem in 1 formula detected - # Error: Stable: version 7.2.0-rc.1 is redundant with version scanned from URL - # Error: Process completed with exit code 1. - # - # We use the version property to quickly determine if an update is needed and we don't want to remove it as the version rule which is being skipped suggests - - run: | - brew audit --strict --online --display-filename --display-cop-names --formula --except 'installed,version' $env:FORMULA_NAME - shell: pwsh - name: Brew Audit - if: github.event_name != 'schedule' - - - name: brew test (Verify tests in formula) - run: | - brew test $env:FORMULA_PATH - shell: pwsh diff --git a/.github/workflows/composite/prep/action.yml b/.github/workflows/composite/prep/action.yml deleted file mode 100644 index 566733b9..00000000 --- a/.github/workflows/composite/prep/action.yml +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -name: "Prepare Agent" - -description: "Prepare Agent" - -defaults: - run: - shell: pwsh - -runs: - using: "composite" - steps: - # See https://brew.sh - - name: Set up Homebrew - id: set-up-homebrew - uses: Homebrew/actions/setup-homebrew@master - - - name: Cache Bundler RubyGems - uses: actions/cache@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: Install Bundler RubyGems - run: brew install-bundler-gems - shell: pwsh - - - name: Update Brew - run: brew update --force --verbose - shell: pwsh - - - name: (scheduled-auto-release) Auto-update formula - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - run: | - &$env:UPDATE_SCRIPT_PATH -FormulaPath $env:FORMULA_PATH -Channel $env:CHANNEL_NAME - shell: pwsh - - - name: Make local repo a tap - run: | - git add -A - git commit -m "Update ${{ env.FORMULA_NAME }} formula to version ${{ env.NEW_FORMULA_VERSION }}" - git clone ./ "$(brew --repo)/Library/Taps/powershell/homebrew-tap" - shell: pwsh diff --git a/.github/workflows/cron-powershell-preview.yml b/.github/workflows/cron-powershell-preview.yml deleted file mode 100644 index 73c14b5b..00000000 --- a/.github/workflows/cron-powershell-preview.yml +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -name: PowerShell preview scheduled update - -permissions: read-all - -on: - workflow_dispatch: - schedule: - # At 20:20 UTC on every day-of-week from Monday through Friday. - - cron: '0 0/4 * * *' - -defaults: - run: - shell: pwsh -env: - FORMULA_PATH: ./Formula/powershell-preview.rb - UPDATE_SCRIPT_PATH: ./scripts/Upgrade-Formula.ps1 - FORMULA_NAME: powershell-preview - CHANNEL_NAME: preview - HOMEBREW_NO_ENV_HINTS: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - -jobs: - homebrew-formula-preview: - timeout-minutes: 15 - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4.2.2 - - - name: Prepare Agent - uses: ./.github/workflows/composite/prep - - - name: Install and Test Formula - uses: ./.github/workflows/composite/installAndTest - - - name: Create PR if needed - uses: ./.github/workflows/composite/createPR - with: - token: ${{ secrets.PR_PAT }} diff --git a/.github/workflows/cron-powershell.yml b/.github/workflows/cron-powershell.yml deleted file mode 100644 index 432c6a5d..00000000 --- a/.github/workflows/cron-powershell.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -name: PowerShell scheduled update - -permissions: read-all - -on: - workflow_dispatch: - schedule: - # At 20:20 UTC on every day-of-week from Monday through Friday. - - cron: '0 0/4 * * *' - -defaults: - run: - shell: pwsh - -env: - FORMULA_PATH: ./Formula/powershell.rb - UPDATE_SCRIPT_PATH: ./scripts/Upgrade-Formula.ps1 - FORMULA_NAME: powershell - CHANNEL_NAME: stable - HOMEBREW_NO_ENV_HINTS: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - -jobs: - homebrew-formula-stable: - timeout-minutes: 15 - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4.2.2 - - - name: Prepare Agent - uses: ./.github/workflows/composite/prep - - - name: Uninstall PowerShell - shell: bash - run: | - cd / - PKG_ID='com.microsoft.powershell' - pkgutil --only-files --files ${PKG_ID} | awk '!/\.app/' | tr '\n' '\0' | xargs -n 1 -0 -p sudo rm - sudo pkgutil --forget ${PKG_ID} - - - name: Install and Test Formula - uses: ./.github/workflows/composite/installAndTest - - - name: Create PR if needed - uses: ./.github/workflows/composite/createPR - with: - token: ${{ secrets.PR_PAT }} diff --git a/Formula/powershell-lts.rb b/Formula/powershell-lts.rb index fe82019b..2bcffa34 100644 --- a/Formula/powershell-lts.rb +++ b/Formula/powershell-lts.rb @@ -29,6 +29,11 @@ class PowershellLts < Formula version "7.4.11" version_scheme 1 + # Deprecated: this tap is unmaintained now that PowerShell ships in Homebrew + # Core. Core has no LTS formula; install the stable `powershell` formula + # (`brew install powershell`) or an official PowerShell package instead. + deprecate! date: "2026-06-18", because: "is unmaintained now that PowerShell is published to Homebrew Core" + # .NET Core 3.1 requires High Sierra - https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?pivots=os-macos&tabs=netcore31 depends_on macos: :high_sierra diff --git a/Formula/powershell-preview.rb b/Formula/powershell-preview.rb index 6e1affa0..c92723d3 100644 --- a/Formula/powershell-preview.rb +++ b/Formula/powershell-preview.rb @@ -33,6 +33,11 @@ class PowershellPreview < Formula url :head end + # Deprecated: this tap is unmaintained now that PowerShell ships in Homebrew + # Core. Core has no preview formula; install the stable `powershell` formula + # (`brew install powershell`) or an official PowerShell preview package instead. + deprecate! date: "2026-06-18", because: "is unmaintained now that PowerShell is published to Homebrew Core" + # .NET Core 3.1 requires High Sierra - https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?pivots=os-macos&tabs=netcore31 depends_on macos: :high_sierra diff --git a/Formula/powershell.rb b/Formula/powershell.rb index 618bdc29..86039885 100644 --- a/Formula/powershell.rb +++ b/Formula/powershell.rb @@ -29,6 +29,10 @@ class Powershell < Formula version "7.5.2" version_scheme 1 + # Deprecated: PowerShell is now maintained directly by Homebrew Core, which + # publishes its own `powershell` formula. Run `brew install powershell`. + deprecate! date: "2026-06-18", because: "is now maintained by Homebrew Core as the `powershell` formula" + # .NET Core 3.1 requires High Sierra - https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?pivots=os-macos&tabs=netcore31 depends_on macos: :high_sierra