From 14d6b9f763a337bbb9578a39c9018eca158f3070 Mon Sep 17 00:00:00 2001 From: mcchampions <1309635304@qq.com> Date: Mon, 15 Jul 2024 21:45:54 +0800 Subject: [PATCH] Create getversion.js --- javascript/getversion.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 javascript/getversion.js diff --git a/javascript/getversion.js b/javascript/getversion.js new file mode 100644 index 0000000..808d6cf --- /dev/null +++ b/javascript/getversion.js @@ -0,0 +1,8 @@ +const fs = require('fs'); + +var xmldoc=document.implementation.createDocument('','',null); +xmldoc.async=false; +xmldoc.load('../pom.xml'); +var version = xmldoc.getElementsByName("version")[0]; +console.info("DodoOpenJavaVersion=" + version.textContent) +fs.writeFileSync(process.env.GITHUB_OUTPUT, 'version=' + version.textContent); \ No newline at end of file