-
Notifications
You must be signed in to change notification settings - Fork 439
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
Add versions.json #516
Add versions.json #516
Conversation
- Using `jq -r` makes removing quotes from strings unnecessary - Overhaul jq script of mariaversion() to identify a milestone's latest version
'versions.json' contains information about the versions available in this repo. It is managed by `./update.sh`; there's no need to edit this file manually, just run `./update.sh`.
Thanks for the contribution and fixing my clunky update.sh. It looks ok, but I'm still trying understand the actual users of the Other programmatic ways:
(also suffers from delay accuracy) |
The idea of Accessing the latest MariaDB version is just an example, the same applies to any of the information provided in Personally I need to know the exact MariaDB version to decide whether I need to rebuild my image. Since I'm using the Dockerfile directly, I can't rely on MariaDB's REST API due to said delays, because the REST API might yield a new version that wasn't released in this repo yet. The same is true when pulling the image from Docker Hub to examine the image (like accessing the version label, or the $ sed -ne 's/^ARG MARIADB_VERSION=\([0-9]*:\)\?\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\([+~-].*\)\?$/\2.\3.\4/p' "./vendor/10.5/Dockerfile"
10.5.21 Adding |
Thank for the explanation. |
versions.json
contains information about the MariaDB versions available in this repo (and therefore also on Docker Hub).It was inspired by PHP's
versions.json
, but was adapted to better fit MariaDB's needs. The information inversions.json
is currently scattered across the repo and often just accessible by humans, e.g. right now it's impossible to reliably determine the latest full version of containerized MariaDB 10.5 programmatically. The only way is to either fiddle around withsed
on the Dockerfile, or to build the container.This PR also fixes some issues with
jq
inupdate.sh
. The previous jq script to determine the MariaDB version of a given milestone (mariaversion()
function) was a bit weird (recursively searching for a.release_id
key even caused myjq
to exit with a non-zero status code, causingupdate.sh
to fail; the REST API response has a known structure), so I replaced it. I also switched tojq -r
(enabling raw output), so that Bash doesn't have to remove the quotes first. See a57a46c.versions.json
is managed by./update.sh
, see cb3db38. There's no need to edit this file manually (even when adding/removing milestones), just run./update.sh
. If you pass arguments toupdate.sh
, it will update the entries of the given versions inversions.json
only. See b72beb4 for an example.