From 0034d68736dc76d482c40cba4c9f9006256f0822 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Mon, 23 Feb 2026 19:46:25 +0100 Subject: [PATCH] Revert "Use GitHub workflow to update MODULE.bazel.lock files." This reverts commit abdf4ec107690cab062208b163928a038085eda9. We haven't needed this in a while, so remove it for now to remove some complexity. --- .github/workflows/update-lockfiles.yaml | 45 ------------------- update_lockfiles | 59 ------------------------- 2 files changed, 104 deletions(-) delete mode 100644 .github/workflows/update-lockfiles.yaml delete mode 100755 update_lockfiles diff --git a/.github/workflows/update-lockfiles.yaml b/.github/workflows/update-lockfiles.yaml deleted file mode 100644 index edc6238be..000000000 --- a/.github/workflows/update-lockfiles.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 2021-2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Update MODULE.bazel.lock files -on: workflow_dispatch - -permissions: - contents: read - -jobs: - update: - name: Update lockfiles - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{matrix.os}} - steps: - - name: Check out repository - uses: actions/checkout@v6 - - name: Set up workspace - uses: ./.github/actions/set-up - - name: Regenerate lockfiles - shell: pwsh - run: | - $PSNativeCommandUseErrorActionPreference = $true - bazelisk mod deps --lockfile_mode=update - Join-Path -Path examples -ChildPath ext | Set-Location - bazelisk mod deps --lockfile_mode=update - - name: Upload lockfiles - uses: actions/upload-artifact@v6 - with: - name: lockfiles-${{runner.os}}-${{runner.arch}} - path: '**/MODULE.bazel.lock' - if-no-files-found: error diff --git a/update_lockfiles b/update_lockfiles deleted file mode 100755 index 343587129..000000000 --- a/update_lockfiles +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh - -# Copyright 2024, 2025, 2026 Philipp Stephani -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -euC - -workflow=update-lockfiles.yaml -run=lock.run - -if [ -f "${run:?}" ]; then - read -r id < "${run:?}" -else - branch="$(git branch --show-current)" - url="$(gh workflow run "${workflow:?}" --ref="${branch:?}")" - id="${url##*/}" - echo "${id:?}" > "${run:?}" -fi - -gh run watch "${id:?}" --exit-status -gh run download "${id:?}" - -for dir in . examples/ext; do - out="${dir:?}/MODULE.bazel.lock" - linux="lockfiles-Linux-X64/${out:?}" - macos="lockfiles-macOS-ARM64/${out:?}" - windows="lockfiles-Windows-X64/${out:?}" - bazel run \ - --lockfile_mode=off \ - --norun_validations \ - --output_groups=-mypy \ - -- \ - @phst_merge_bazel_lockfiles//:merge \ - --linux-amd64="${linux:?}" \ - --darwin-arm64="${macos:?}" \ - --windows-amd64="${windows:?}" \ - --local="${out:?}" \ - --output="${out:?}" - rm -- "${linux:?}" "${macos:?}" "${windows:?}" -done - -# This will fail if we forgot some OS above. -rmdir -- \ - lockfiles-*/examples/ext \ - lockfiles-*/examples \ - lockfiles-* - -rm -- "${run:?}"