Skip to content

Commit

Permalink
Add script and pipeline step to update documentation links (#4905)
Browse files Browse the repository at this point in the history
### Changes

- Introduce a script to fix release links in the gh-pages branch
- Add a step in the release pipeline to execute this script.

### Notes
- I removed user interaction from make_redirects.sh in the gh-pages
branch

fix #4902
  • Loading branch information
paolino authored Jan 7, 2025
2 parents fa88d39 + 2a52f3c commit 98e8d6d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .buildkite/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,8 @@ steps:
- "./docker-build-push"
agents:
system: x86_64-linux

- label: Update Documentation Links
depends_on: create-release
commands:
- nix develop path:$RELEASE_SCRIPTS_DIR -c $RELEASE_SCRIPTS_DIR/update-documentation-links.sh
13 changes: 13 additions & 0 deletions scripts/buildkite/release/update-documentation-links.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /usr/bin/env bash

set -euox pipefail

RELEASE_VERSION=$(buildkite-agent meta-data get release-version)
GH_PAGES_BRANCH="gh-pages"

git checkout "${GH_PAGES_BRANCH}"
git pull origin "${GH_PAGES_BRANCH}"
cd releases
./make_redirects.sh "${RELEASE_VERSION}"
git remote set-url origin "https://$GITHUB_TOKEN@github.com/cardano-foundation/cardano-wallet.git"
git push origin "${GH_PAGES_BRANCH}"

0 comments on commit 98e8d6d

Please sign in to comment.