Skip to content

Add a script to populate the array of available versions (per project) #47

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marko-bekhta
Copy link
Member

a new JSON file docs_htdocs/hibernate/_available-versions/${PROJECT}.json that will simply have an array of versions:

[ "1.0", "2.0", "2.1",  "3.0" ...  ]

And then we can use that in the script to populate the dropdown in the docs...
I've tried to add it in a way that wouldn't require us to go and update project builds.
If this makes sense, I'll go create the files with the current versions and then update the js in orm (as a first step to share this between projects)

exit 1
fi

pushd ${WORKSPACE}
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure this points to a directory that git-ignores available-*.json?

Copy link
Member Author

Choose a reason for hiding this comment

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

I just blindly copypasted the upload-documentation.sh where the outadeted json is updated 🙈


pushd ${WORKSPACE}

wget -q http://docs.jboss.org/hibernate/_available-versions/${PROJECT}.json -O "available-${PROJECT}.json"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
wget -q http://docs.jboss.org/hibernate/_available-versions/${PROJECT}.json -O "available-${PROJECT}.json"
wget -q http://docs.jboss.org/hibernate/_data/${PROJECT}/releases.json -O "releases.json"

? 🙈

Copy link
Member

Choose a reason for hiding this comment

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

or /series.json, I guess?

Copy link
Member

@yrodiere yrodiere Jun 2, 2025

Choose a reason for hiding this comment

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

That being said, we can probably expose this -- and much more -- at hibernate.org/_data/${PROJECT}.json. Like, much, much more. Series, releases, links to docs -- you name it.

Copy link
Member Author

Choose a reason for hiding this comment

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

rigth ... if we go with hibernate.org there'd be some cors update required I assume 😃
and if it's hibernate.org you mean it'll be a part of the ruby website build, right ?

Copy link
Member

Choose a reason for hiding this comment

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

Right, that's what I meant.
Yes we'd need cors updates, but I think it's defined in HTML headers, which we'd have modify anyway... no?

Copy link
Member Author

Choose a reason for hiding this comment

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

yup, we just don't do it yet as for now all files come from the same server. but adding that cors in shouldn't be a problem, just need to keep in mind that orm is doing it not with these scripts 😃
I'll take a look at adding it to hibernate.org later today (or this week)

Copy link
Member

Choose a reason for hiding this comment

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

No rush, Marko. Maybe let's talk again before you do that? I'm sure you have plenty on your hands already :)

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