glasgow: simplify PDM_BUILD_SCM_VERSION

Remove one manual step when updating, we don't need to maintain the
commit counter, as discussed in the glasgow IRC channel.
This commit is contained in:
Florian Klink
2025-07-28 20:50:05 +02:00
parent ea86aa9af0
commit e509766da3
+4 -4
View File
@@ -12,13 +12,13 @@
python3.pkgs.buildPythonApplication rec {
pname = "glasgow";
version = "0-unstable-2025-07-28";
# from `pdm show`
realVersion =
# Similar to `pdm show`, but without the commit counter
pdmVersion =
let
tag = builtins.elemAt (lib.splitString "-" version) 0;
rev = lib.substring 0 7 src.rev;
in
"${tag}.1.dev2611+g${rev}";
"${tag}.1.dev0+g${rev}";
# the latest commit ID touching the `firmware` directory, can differ from rev!
firmwareGitRev = "4fe35360";
@@ -77,7 +77,7 @@ python3.pkgs.buildPythonApplication rec {
cmp -s firmware/glasgow.ihex software/glasgow/hardware/firmware.ihex
cd software
export PDM_BUILD_SCM_VERSION="${realVersion}"
export PDM_BUILD_SCM_VERSION="${pdmVersion}"
'';
# installCheck tries to build_ext again