From e8f9130175fc39fcb8ef0375861de45e522a6693 Mon Sep 17 00:00:00 2001 From: PruStephan Date: Thu, 28 Dec 2023 20:47:57 +0100 Subject: [PATCH] fixup! fixup! fixup! fixup! [#736] Add setup to automatically update binaries --- docker/package/update-binaries-list.py | 5 ++++- docker/update-binaries-list.sh | 24 ------------------------ scripts/update-tezos.sh | 3 +++ 3 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 docker/update-binaries-list.sh diff --git a/docker/package/update-binaries-list.py b/docker/package/update-binaries-list.py index 35d20caa4..db2cb558c 100644 --- a/docker/package/update-binaries-list.py +++ b/docker/package/update-binaries-list.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2023 Oxhead Alpha # SPDX-License-Identifier: LicenseRef-MIT-OA @@ -22,11 +23,13 @@ def update_binaries(binaries, field): def main(): tag = os.environ["BUILDKITE_TAG"] binaries = [] - binaries = list(all_packages.keys()) + with open(f"{os.path.dirname(__file__)}/../octez-executables", "r") as f: + binaries = [l.strip() for l in f.readlines()] if not binaries: raise Exception( "Exception, while reading binaries list: binaries list is empty" ) + binaries.append() field = "candidates" if "rc" in tag else "released" diff --git a/docker/update-binaries-list.sh b/docker/update-binaries-list.sh deleted file mode 100644 index 36a646d59..000000000 --- a/docker/update-binaries-list.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# SPDX-FileCopyrightText: 2019 TQ Tezos -# -# SPDX-License-Identifier: LicenseRef-MIT-TQ - -bot_name="CI bot" -branch="update-binaries-list-$BUILDKITE_TAG" - -git config --local user.email "hi@serokell.io" -git config --local user.name "$bot_name" -git fetch --all -git checkout -B "$branch" - -python3 -m docker.package.update-binaries-list - -git add tests/binaries.json -if [ -n "$(git diff --staged)" ]; then - git commit -m "Updated binaries for $BUILDKITE_TAG release" --gpg-sign="tezos-packaging@serokell.io" - git push --set-upstream origin "$branch" - gh pr create -B master -t "Update list of binaries for $BUILDKITE_TAG" -F ../.github/binaries_list_update_pull_request.md -else - echo "Git diff is empty. Nothing to commit." -fi - diff --git a/scripts/update-tezos.sh b/scripts/update-tezos.sh index 8cf9264ed..92d0a0530 100755 --- a/scripts/update-tezos.sh +++ b/scripts/update-tezos.sh @@ -62,6 +62,9 @@ if [[ "$latest_upstream_tag" != "$our_tezos_tag" ]]; then ./scripts/update-release-binaries.py git commit -a -m "[Chore] Update release binaries for $latest_upstream_tag" --gpg-sign="tezos-packaging@serokell.io" + ./docker/package/update-binaries-list.py + git commit -a -m "[Chore] Update list of supported binaries for $latest_upstream_tag" --gpg-sign="tezos-packaging@serokell.io" + git push --set-upstream origin "$branch_name" gh pr create -B master -t "[Chore] $latest_upstream_tag release" -F .github/release_pull_request_template.md