v0.143.0 #2690
maxandersen
started this conversation in
General
v0.143.0
#2690
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Unified version syntax for aliases
You've always been able to run a specific version of an alias - but how depended entirely on what the alias pointed at. A Maven GAV took a version one way, a git tag or branch another, a property placeholder another still. Three mechanisms, three mental models, and in some cases the catalog author had to set things up ahead of time for it to work at all.
With special effort and thanks to @wfouche we've managed to unify all of that behind a single syntax:
That's it. The same
alias:version@catalogform works whether the alias resolves to a Maven artifact, a GitHub/GitLab/Bitbucket URL, or a property-driven path - you no longer need to know how it's wired underneath.Under the covers JBang looks at the alias's
script-refand applies the matching strategy, so the one syntax maps cleanly onto each mechanism:script-refjbang mytool:2.0.0resolves tocom.example:mytool:1.0.0com.example:mytool:2.0.0com.example:mytool:1.0.0:jar@distcom.example:mytool:2.0.0:jar@disthttps://github.com/acme/mytool/blob/v1.0.0/Tool.java.../blob/v2.0.0/Tool.javaio.quarkus:quarkus-cli:${jbang.app.version:3.0.0}io.quarkus:quarkus-cli:2.0.0tool.jartool.jarunchanged - version still exposed to the scriptFor the common cases the author does nothing special - Maven GAVs and git URLs just work, and the catalog format is unchanged and fully backward-compatible. When an author does want to adapt, they can expose a
${jbang.app.version}placeholder in thescript-refwith a default:{ "aliases": { "quarkus": { "script-ref": "io.quarkus:quarkus-cli:${jbang.app.version:3.0.0}" } } }jbang quarkus@mycataloggives you 3.0.0,jbang quarkus:3.15.1@mycataloggives you that one - same alias, no duplicated entries. And the requested version is always passed to the script as-Djbang.app.version=<version>, so even an alias that matches none of the patterns can read it and act on it itself:A few things worth knowing:
So the everyday case - reproducing a bug report and checking the fix - becomes just:
See the updated Alias Catalogs guide for the full details.
Have fun!
Changelog
🚀 Features
🐛 Fixes
🔄️ Changes
🧰 Tasks
🛠 Build
📝 Documentation
Contributors
We'd like to thank the following people for their contributions:
Arnab Nandy, GitHub, MD. Mohiuddin ahmed, Max Rydahl Andersen, Mend Renovate, Tamas Cservenak, Werner Fouché, coderabbitai[bot]
This discussion was created from the release v0.143.0.
All reactions