This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git
The following commit(s) were added to refs/heads/main by this push:
new 565fe8c Fix CI: generate version.properties from git directly, not
upstream build output
565fe8c is described below
commit 565fe8c14295808e76bd9d6fc6e0f4c62835807a
Author: Wu Sheng <[email protected]>
AuthorDate: Tue Feb 24 16:49:45 2026 +0800
Fix CI: generate version.properties from git directly, not upstream build
output
---
oap-graalvm-server/pom.xml | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/oap-graalvm-server/pom.xml b/oap-graalvm-server/pom.xml
index 316bd19..9e8ede6 100644
--- a/oap-graalvm-server/pom.xml
+++ b/oap-graalvm-server/pom.xml
@@ -480,29 +480,28 @@
</goals>
<configuration>
<target>
- <copy
file="${project.basedir}/../skywalking/oap-server/server-starter/src/main/resources/version.properties"
-
tofile="${project.build.outputDirectory}/version.properties"
- overwrite="true"/>
- <!-- Load the commit id from the copied file
-->
- <loadproperties
srcFile="${project.build.outputDirectory}/version.properties"
- prefix="upstream."/>
- <!-- Extract first 7 chars of commit id -->
+ <!-- Generate version.properties from
submodule git metadata.
+ Does not depend on upstream's
git-commit-id-plugin output. -->
+ <exec executable="git"
dir="${project.basedir}/../skywalking"
+ outputproperty="upstream.git.commit.id"
failonerror="true">
+ <arg value="rev-parse"/>
+ <arg value="HEAD"/>
+ </exec>
<loadresource
property="upstream.git.commit.id.short">
<string value="${upstream.git.commit.id}"/>
<filterchain>
<replaceregex pattern="^(.{7}).*$"
replace="\1"/>
</filterchain>
</loadresource>
- <!-- Replace -SNAPSHOT with -<short-commit>
(only matches if -SNAPSHOT exists) -->
- <replaceregexp
file="${project.build.outputDirectory}/version.properties"
-
match="^(git\.build\.version=.*)-SNAPSHOT$"
-
replace="\1-${upstream.git.commit.id.short}"
- byline="true"/>
- <!-- Append -graal-distro suffix -->
- <replaceregexp
file="${project.build.outputDirectory}/version.properties"
-
match="^(git\.build\.version=.+)$"
- replace="\1-graal-distro"
- byline="true"/>
+ <!-- Build version: replace -SNAPSHOT with
-<short-commit>, then append -graal-distro -->
+ <loadresource
property="upstream.build.version">
+ <string value="${skywalking.version}"/>
+ <filterchain>
+ <replaceregex pattern="-SNAPSHOT$"
replace="-${upstream.git.commit.id.short}"/>
+ </filterchain>
+ </loadresource>
+ <echo
file="${project.build.outputDirectory}/version.properties"
+ message="#Generated by
skywalking-graalvm-distro${line.separator}git.build.version=${upstream.build.version}-graal-distro${line.separator}git.commit.id=${upstream.git.commit.id}${line.separator}"/>
</target>
</configuration>
</execution>