ci: derive version from pom.xml

This commit is contained in:
Hugo Renard 2024-11-27 09:46:23 +01:00
parent f7a787485f
commit 0c5e5ca00a
Signed by: hougo
GPG key ID: 3A285FD470209C59

View file

@ -20,7 +20,13 @@
{
packages.default = pkgs.maven.buildMavenPackage rec {
pname = "keycloak-scim";
version = "1.0-SNAPSHOT";
version = (
builtins.readFile (
pkgs.runCommand "version" { } ''
${pkgs.coreutils}/bin/cat ${src}/pom.xml | ${pkgs.xq-xml}/bin/xq -x "project/version" | ${pkgs.coreutils}/bin/tr -d '\n' > $out
''
)
);
src = ./.;
mvnHash = "sha256-y3ASPCAbgwSJNu4NiBeWNFc8YA903C0e5z0/TSlc3Og=";