diff --git a/.github/workflows/release-deploy.yml b/.github/workflows/release-deploy.yml index c8fc22e..6c84722 100644 --- a/.github/workflows/release-deploy.yml +++ b/.github/workflows/release-deploy.yml @@ -48,6 +48,11 @@ jobs: - name: Link ci-tools if: github.repository == 'TokTok/ci-tools' run: ln -s .. third_party/ci-tools + - name: Download hub-restyled + run: | + mkdir -p third_party/ci-tools/tools + curl -sSL https://raw.githubusercontent.com/TokTok/hs-github-tools/master/tools/hub-restyled -o third_party/ci-tools/tools/hub-restyled + chmod +x third_party/ci-tools/tools/hub-restyled - name: Create GitHub actions identity run: third_party/ci-tools/tools/use_github_actions_identity.sh - name: Set up git upstream remote diff --git a/tools/create_release.py b/tools/create_release.py index 12a1949..f27bf2f 100755 --- a/tools/create_release.py +++ b/tools/create_release.py @@ -617,7 +617,11 @@ def stage_restyled(self, version: str, parent: stage.Stage) -> None: # Can't do this on CI. return with stage.Stage("Restyled", "Applying restyled fixes", parent=parent) as s: - subprocess.run(["hub-restyled"], check=True) # nosec + script_dir = os.path.dirname(os.path.realpath(__file__)) + hub_restyled = os.path.join(script_dir, "hub-restyled") + if not os.path.exists(hub_restyled): + hub_restyled = "hub-restyled" + subprocess.run([hub_restyled], check=True) # nosec if self.git.is_clean(): raise s.fail("Failed to apply restyled changes") self.git.add(".")