Last active
December 19, 2022 20:44
-
-
Save joewiz/6a157163034a3111dcf72346af36470b to your computer and use it in GitHub Desktop.
Populate version info for the eXist issue tracker
This file contains hidden or 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"; | |
(: Note: the environment-variable functions only work if the user running the query has DBA access :) | |
(: Probe available environment variables with the following query :) | |
(: | |
map:merge( | |
available-environment-variables() ! map:entry(., environment-variable(.)) | |
), | |
:) | |
string-join( | |
( | |
"- " || system:get-product-name() || " version + Git Revision hash: eXist " || system:get-version() || "+" || system:get-revision() || " (build " || system:get-build() || ")", | |
"- Java version: " || (environment-variable("JAVA_HOME") => tokenize("/"))[matches(., "\d+\.\d+\.\d+")], | |
"- Operating system: " || environment-variable("_system_name") || " " || environment-variable("_system_version"), | |
"- 32 or 64 bit: " || environment-variable("_system_arch"), | |
"- Any custom changes in e.g. conf.xml: " | |
), | |
" ") |
This file contains hidden or 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
- eXist version + Git Revision hash: eXist 3.5.0-SNAPSHOT+0875a60cc (build 201709211530) | |
- Java version: jdk1.8.0_144.jdk | |
- Operating system: OSX 10.12 | |
- 32 or 64 bit: x86_64 | |
- Any custom changes in e.g. conf.xml: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@line-o Thanks! I've updated the code to use that.