Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix haddock dropdown element in haddock index #6556

Merged
merged 6 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/haddock-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ 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
type: string

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
Expand All @@ -33,11 +33,20 @@ 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

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
Expand All @@ -54,8 +63,8 @@ jobs:

- name: Checkout Haddock Script
run: |
git fetch origin 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: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions scripts/combined-haddock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ 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"
local min_ver="1.30.0.0"
echo master
echo latest
for ver in $versions; do
Expand Down Expand Up @@ -272,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)"



Expand Down
Loading