From 142ed621868a3f1b137563475269b7eebf35540a Mon Sep 17 00:00:00 2001 From: zeme Date: Wed, 9 Oct 2024 08:48:11 +0200 Subject: [PATCH 1/6] Fetch git tags before listing plutus versions in combined-haddock.sh --- scripts/combined-haddock.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/combined-haddock.sh b/scripts/combined-haddock.sh index 03d1d09a108..1b95bb6e76a 100755 --- a/scripts/combined-haddock.sh +++ b/scripts/combined-haddock.sh @@ -235,6 +235,7 @@ fi echo "Injecting additional prologue html" list-valid-plutus-versions() { + git fetch --tags --force local versions="$(git tag | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | sort -rV | uniq | tr ' ' '\n')" local min_ver="1.27.0.0" echo master From bfcd164f2f5bad9cb2ea49f2c5c137f720735f2d Mon Sep 17 00:00:00 2001 From: zeme Date: Thu, 10 Oct 2024 10:22:02 +0200 Subject: [PATCH 2/6] Start from 1.30.0.0 --- scripts/combined-haddock.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/combined-haddock.sh b/scripts/combined-haddock.sh index 1b95bb6e76a..7afdbcf24c0 100755 --- a/scripts/combined-haddock.sh +++ b/scripts/combined-haddock.sh @@ -237,7 +237,7 @@ echo "Injecting additional prologue html" list-valid-plutus-versions() { git fetch --tags --force local versions="$(git tag | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | sort -rV | uniq | tr ' ' '\n')" - local min_ver="1.27.0.0" + local min_ver="1.30.0.0" echo master echo latest for ver in $versions; do From eb527f0ef647110745e05ddb7e5e1270b9166125 Mon Sep 17 00:00:00 2001 From: zeme Date: Thu, 10 Oct 2024 10:31:59 +0200 Subject: [PATCH 3/6] wip --- .github/workflows/haddock-site.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/haddock-site.yml b/.github/workflows/haddock-site.yml index b43b800392b..99a3a79b5ed 100644 --- a/.github/workflows/haddock-site.yml +++ b/.github/workflows/haddock-site.yml @@ -16,7 +16,7 @@ on: inputs: ref: description: | - The $ref to build off of, e.g. "1.29.0.0", "master", or any other valid git ref. + The ref to build off of, e.g. "1.29.0.0", "master", or any other valid git ref. When making a release, this is usually the version tag, e.g. "1.29.0.0", and will be equal to the $destination input below. When back-porting this could be a commit sha instead. required: true @@ -24,7 +24,7 @@ on: destination: description: | - The $destination folder, e.g. when "1.29.0.0" the haddock site will be deployed to: + The destination folder, e.g. when "1.29.0.0" the haddock site will be deployed to: https://plutus.cardano.intersectmbo.org/haddock/1.29.0.0 required: true type: string @@ -33,7 +33,8 @@ on: description: | If true, then the haddock site will also be deployed to: https://plutus.cardano.intersectmbo.org/haddock/latest. - You want to leave this to true unless you are deploying old versions or back-porting. + You want to check this when you are making a release. + You want to uncheck this when you are deploying old versions or back-porting. type: boolean required: true default: true From 8bc986a3ac64486eb1829ea14406560557688ef2 Mon Sep 17 00:00:00 2001 From: zeme Date: Thu, 10 Oct 2024 11:11:38 +0200 Subject: [PATCH 4/6] update --- .github/workflows/haddock-site.yml | 10 +++++++++- .gitignore | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/haddock-site.yml b/.github/workflows/haddock-site.yml index 99a3a79b5ed..8f1d08679ec 100644 --- a/.github/workflows/haddock-site.yml +++ b/.github/workflows/haddock-site.yml @@ -39,6 +39,14 @@ on: required: true default: true + script_ref: + description: | + What branch to fetch the combined-haddock.sh script from. + Leave this to 'master' unless you are testing a new version of the script. + type: string + required: true + default: 'master' + jobs: deploy: name: Deploy @@ -55,7 +63,7 @@ jobs: - name: Checkout Haddock Script run: | - git fetch origin master + git fetch origin ${{ inputs.script_ref || 'master' }} git checkout origin/master ./scripts/combined-haddock.sh - name: Build Site diff --git a/.gitignore b/.gitignore index 217d94853ee..ddd3d9163d8 100644 --- a/.gitignore +++ b/.gitignore @@ -103,7 +103,7 @@ node.sock .pre-commit-config.yaml secrets/*/.gpg-id ghcid.txt -haddock +haddock* .private linkchecker-out.txt plutus-pab/test-node/testnet/db From 9c43352c4b32e27283c3166f036b705b2be559ea Mon Sep 17 00:00:00 2001 From: zeme Date: Thu, 10 Oct 2024 11:15:22 +0200 Subject: [PATCH 5/6] wip --- scripts/combined-haddock.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/combined-haddock.sh b/scripts/combined-haddock.sh index 7afdbcf24c0..b4eda2ca9be 100755 --- a/scripts/combined-haddock.sh +++ b/scripts/combined-haddock.sh @@ -273,7 +273,9 @@ build-version-select-html() { echo "$html" } -inject-text-at-char "$OUTPUT_DIR/index.html" 1465 "$(build-version-select-html)" +SELECT_ELEM_POSITION_IN_INDEX_HTML=1465 + +inject-text-at-char "$OUTPUT_DIR/index.html" $SELECT_ELEM_POSITION_IN_INDEX_HTML "$(build-version-select-html)" From 8f8c6189ecdf8dc19c1d22e2856c16a0764d62fd Mon Sep 17 00:00:00 2001 From: zeme Date: Thu, 10 Oct 2024 11:16:40 +0200 Subject: [PATCH 6/6] wip --- .github/workflows/haddock-site.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/haddock-site.yml b/.github/workflows/haddock-site.yml index 8f1d08679ec..708a1281e48 100644 --- a/.github/workflows/haddock-site.yml +++ b/.github/workflows/haddock-site.yml @@ -63,8 +63,8 @@ jobs: - name: Checkout Haddock Script run: | - git fetch origin ${{ inputs.script_ref || 'master' }} - git checkout origin/master ./scripts/combined-haddock.sh + git fetch origin ${{ inputs.script_ref }} + git checkout origin/${{ inputs.script_ref }} ./scripts/combined-haddock.sh - name: Build Site run: |