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

build.sh accepts version argument #4342

Merged
merged 3 commits into from
Feb 10, 2025
Merged

Conversation

duncanbeevers
Copy link
Contributor

@duncanbeevers duncanbeevers commented Feb 8, 2025

  • build.sh with no arguments builds all versions
  • build.sh <version> builds single version
  • build.sh latest builds latest version
  • build.sh src builds from src/oas.md
  • Resolve Google Analytics snippet location relative to md2html.js
  • Update tests to reflect inclusion of snippet

Pre-requisite to #4341

  • schema changes are included in this pull request
  • schema changes are needed for this pull request but not done yet
  • no schema changes are needed for this pull request

@duncanbeevers duncanbeevers requested review from a team as code owners February 8, 2025 13:05
build.sh with no arguments builds all versions
build.sh <version> builds single version
build.sh latest builds latest version
build.sh src builds from src/oas.md
Resolve Google Analytics snippet location relative to md2html.js
Update tests to reflect inclusion of snippet
Pre-requisite to OAI#4341
@duncanbeevers duncanbeevers changed the title Always include Google Analytics snippet build.sh accepts version argument Feb 8, 2025
Copy link
Contributor

@ralfhandl ralfhandl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Only one desired change.

scripts/md2html/build.sh Outdated Show resolved Hide resolved
Comment on lines 45 to 51
if [ "$1" = "src" ]; then
destination="$deploydir/$version.html"
maintainers="EDITORS.md"
else
destination="$deploydir/v$version.html"
maintainers="$(dirname $specification)/$version-editors.md"
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this up and set deploydir to deploy-preview only for "src".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this as far up the block as I could, but as these values depend on $version, they need to be defined in-loop.

@ralfhandl
Copy link
Contributor

One more thing:

  • deploy-preview/ needs to be added to .gitignore

build.sh with no arguments builds all versions
build.sh <version> builds single version
build.sh latest builds latest version
build.sh src builds from src/oas.md
Resolve Google Analytics snippet location relative to md2html.js
Update tests to reflect inclusion of snippet
Pre-requisite to OAI#4341
Copy link
Contributor

@ralfhandl ralfhandl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there! Just one nit for the src special case on *dev branches.

scripts/md2html/build.sh Outdated Show resolved Hide resolved
@ralfhandl ralfhandl requested a review from a team February 10, 2025 08:55
@ralfhandl ralfhandl merged commit 8e3015a into OAI:main Feb 10, 2025
2 checks passed
@duncanbeevers duncanbeevers deleted the build-src-changes branch February 10, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants