Explorar o código

fix: tighten semver tag filters

copilot-swe-agent[bot] hai 3 meses
pai
achega
726e900230
Modificáronse 3 ficheiros con 5 adicións e 4 borrados
  1. 1 1
      .github/workflows/build.yml
  2. 1 1
      .github/workflows/release.yml
  3. 3 2
      OpenPuck/webusb_config.cpp

+ 1 - 1
.github/workflows/build.yml

@@ -5,7 +5,7 @@ on:
     branches:
       - main
     tags:
-      - '*.*.*'
+      - '[0-9]*.[0-9]*.[0-9]*'
   # PRs get the same gate -- without this the checks only ran after merge.
   pull_request:
 

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

@@ -5,7 +5,7 @@ on:
     branches:
       - main
     tags:
-      - '*.*.*'
+      - '[0-9]*.[0-9]*.[0-9]*'
   release:
     types:
       - published

+ 3 - 2
OpenPuck/webusb_config.cpp

@@ -116,8 +116,9 @@ static void webusbSendBlob()
 	p[40] = OPK_GIT_DIRTY ? 1 : 0;
 	memset(&p[41], 0, 12); // 12B ASCII build ID, NUL-padded
 	{
-		const char *buildId = OPK_BUILD_VERSION[0] ? OPK_BUILD_VERSION :
-							     OPK_GIT_HASH;
+		const char *buildId = OPK_BUILD_VERSION;
+		if (!buildId[0])
+			buildId = OPK_GIT_HASH;
 		for (uint8_t i = 0; i < 12 && buildId[i]; i++)
 			p[41 + i] = (uint8_t)buildId[i];
 	}