Forráskód Böngészése

chore: tighten provenance comments

copilot-swe-agent[bot] 3 hónapja
szülő
commit
eff673c13e
3 módosított fájl, 6 hozzáadás és 9 törlés
  1. 0 1
      .github/workflows/release.yml
  2. 2 2
      OpenPuck/webusb_config.cpp
  3. 4 6
      gen_version.sh

+ 0 - 1
.github/workflows/release.yml

@@ -42,7 +42,6 @@ jobs:
           )"
 
           if [ -z "$LAST" ]; then
-            # Bootstrap the first semver release tag at 0.9.1.
             NEXT="0.9.1"
           else
             MAJOR="${LAST%%.*}"

+ 2 - 2
OpenPuck/webusb_config.cpp

@@ -111,8 +111,8 @@ static void webusbSendBlob()
 	p[39] = g_linkRssi[g_curSlot >= 0 && g_curSlot < NSLOT ?
 				   g_curSlot :
 				   0]; // RAW signal strength |dBm| (0=no sample)
-	// Build ID + dirty flag from build_info.h/gen_version.sh. Prefer semver when
-	// present, otherwise fall back to the git hash.
+	// Release builds are tagged and easier to trace by semver; local/dev builds
+	// still expose git hash when no version tag is available.
 	p[40] = OPK_GIT_DIRTY ? 1 : 0;
 	memset(&p[41], 0, 12); // 12B ASCII build ID, NUL-padded
 	{

+ 4 - 6
gen_version.sh

@@ -1,10 +1,8 @@
 #!/bin/sh
-# gen_version.sh -- write OpenPuck/git_version.h with build provenance for the WebUSB panel:
-#   - semantic version (when OPK_BUILD_VERSION is set, or HEAD has a semver tag),
-#   - git short hash,
-#   - dirty flag.
-# Run this BEFORE `arduino-cli compile` (it's a no-op to re-run). The generated header is git-ignored, so
-# generating it never itself marks the tree dirty.
+# gen_version.sh -- write OpenPuck/git_version.h with the release/build identity shown in WebUSB.
+# Keep both semver + hash so local untagged builds still expose provenance.
+# Run this BEFORE `arduino-cli compile`. The generated header is git-ignored, so generating it never itself
+# marks the tree dirty.
 set -e
 cd "$(dirname "$0")"