Last active
January 12, 2023 19:02
-
-
Save joewiz/5083c3ab59ba21889db961dcffc2e5e7 to your computer and use it in GitHub Desktop.
Generate a CSV containing the latest versions of packages for different
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.1"; | |
import module namespace versions="http://exist-db.org/apps/public-repo/versions" at "/db/apps/public-repo/modules/versions.xqm"; | |
let $exist-versions := ("4.11.0", "5.5.1", "6.1.0") | |
let $abbrevs := ("shared-resources", "dashboard", "doc", "eXide", "functx", "fundocs", "markdown", "monex", "usermanager") | |
let $header-row := ("package", $exist-versions ! ("eXist " || .)) => string-join(", ") | |
let $body-rows := | |
for $abbrev in $abbrevs | |
let $packages := doc("/db/apps/public-repo-data/metadata/package-groups.xml")//package-group[abbrev = $abbrev]//package | |
let $latest := | |
for $exist-version in $exist-versions | |
return | |
versions:get-newest-package-satisfying-exist-version($packages, $exist-version)/version/string() | |
let $cells := ($abbrev, $latest) | |
order by $abbrev | |
return | |
string-join($cells, ",") | |
return | |
string-join(($header-row, $body-rows), " ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | eXist 4.11.0 | eXist 5.5.1 | eXist 6.1.0 | |
---|---|---|---|---|
dashboard | 1.1.1 | 2.0.9 | 2.0.9 | |
doc | 4.2.0 | 5.4.0 | 6.1.0 | |
eXide | 2.4.13 | 3.5.0 | 3.5.0 | |
functx | 1.0.1 | 1.0.1 | 1.0.1 | |
fundocs | 1.1.1 | 1.2.0 | 1.2.0 | |
markdown | 0.7.0 | 1.0.0 | 1.0.0 | |
monex | 1.0.1 | 3.0.5 | 4.0.0 | |
shared-resources | 0.9.1 | 0.9.1 | 0.9.1 | |
usermanager | 0.16.5 | 0.16.5 | 0.16.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment