diff --git a/.github/workflows/cron-powershell-daily.yml b/.github/workflows/cron-powershell-daily.yml deleted file mode 100644 index b3cd762..0000000 --- a/.github/workflows/cron-powershell-daily.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -name: PowerShell daily scheduled update - -permissions: read-all - -on: - workflow_dispatch: - schedule: - # On the 15th of the month - - cron: '0 0 15 * *' - -defaults: - run: - shell: pwsh -l -command ". '{0}'" - -env: - FORMULA_PATH: ./Formula/powershell-daily.rb - UPDATE_SCRIPT_PATH: ./scripts/Upgrade-Formula.ps1 - FORMULA_NAME: powershell-daily - CHANNEL_NAME: daily - HOMEBREW_NO_ENV_HINTS: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - -jobs: - homebrew-formula-daily: - timeout-minutes: 15 - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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/Formula/powershell-daily.rb b/Formula/powershell-daily.rb deleted file mode 100644 index c8bb44d..0000000 --- a/Formula/powershell-daily.rb +++ /dev/null @@ -1,62 +0,0 @@ -# typed: false -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -# frozen_string_literal: true - -# Doc for the class. -# Class to implement Brew Formula to install PowerShell -class PowershellDaily < Formula - desc "Formula to install PowerShell Daily" - homepage "https://github.com/powershell/powershell" - - @arm64url = "https://pscoretestdata.blob.core.windows.net/v7-4-0-daily20231012-2/powershell-7.4.0-daily20231012.2-osx-arm64.tar.gz" - @x64url = "https://pscoretestdata.blob.core.windows.net/v7-4-0-daily20231012-2/powershell-7.4.0-daily20231012.2-osx-x64.tar.gz" - @arm64sha256 = "a30aa1ded5d7c6fc4520f8c7c056cf51854eef5ebe35d01b4a5c67550fbb4037" - @x64sha256 = "cc0e9c181c28986fa5dbc80b69702ffa450b392f617f12d23d5e077285def319" - - # We do not specify `version "..."` as 'brew audit' will complain - see https://github.com/Homebrew/legacy-homebrew/issues/32540 - if Hardware::CPU.intel? - url @x64url - # must be lower-case - sha256 @x64sha256 - else - url @arm64url - # must be lower-case - sha256 @arm64sha256 - end - - version "7.4.0-daily20231012.2" - version_scheme 1 - - # Deprecated because we are unable to maintain the automation to update the formula - deprecate! date: "2023-03-03", because: :unmaintained - - # .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 - - def install - libexec.install Dir["*"] - chmod 0555, libexec/"pwsh" - bin.install_symlink libexec/"pwsh" => "pwsh-daily" - end - - def caveats - <<~EOS - The executable should already be on PATH so run with `pwsh-daily`. If not, the full path to the executable is: - #{bin}/pwsh-daily - - Other application files were installed at : - #{libexec} - - If you would like to make PowerShell Daily your default shell, run - sudo echo '#{bin}/pwsh-daily' >> /etc/shells - chsh -s #{bin}/pwsh-daily - EOS - end - - test do - assert_equal "7.4.0-daily20231012.2", - shell_output("#{bin}/pwsh-daily -c '$psversiontable.psversion.tostring()'").strip - end -end