Compare commits

2 Commits

Author SHA1 Message Date
Tim Hadwen
2c1420ee1c Switch nested submodule URL ssh -> https
kicad-footprint-generator was referenced via SSH (git@gitlab.com:…),
which fails in any CI runner that doesn't have an SSH key for
gitlab.com — including the temporary Gitea runner we stood up for
the keeb pipeline. The repo is public on gitlab.com, so HTTPS works
unauthenticated for clones. Also normalised the tab/space mix on the
branch line.
2026-05-24 13:10:08 +00:00
Tim Hadwen
cb3b65d8eb Fix extract_version: inject commit msg via env (avoid backtick $() trap)
When github.event.head_commit.message contains shell metacharacters
(backticks, $(…), etc.) the literal-interpolation form spliced the
raw text into bash and triggered command substitution. Caught by the
keeb pipeline on Gitea — a commit message with backticks crashed
extract_version in 3 seconds and the whole fab graph cascade-skipped.

Pattern matches the upload-bom env: COMMIT_MESSAGE indirection used
further down the same file. Also routed github.sha the same way so
the fallback branch doesn't accidentally re-introduce the same class
of bug.

Mirror this verbatim into hfsdesign/kicad-ci on Gitea after pushing.
2026-05-24 11:55:42 +00:00
2 changed files with 14 additions and 6 deletions

View File

@@ -63,16 +63,24 @@ jobs:
steps:
- uses: actions/checkout@v4
- id: derive
env:
# Inject via env so commit-message / PR-title backticks or
# other shell metacharacters don't trigger command substitution
# when bash evaluates the script. Direct ${{ … }} interpolation
# into the run: body would splice the raw text into bash —
# backticks become $(…). Keep this env-var indirection.
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
PR_TITLE: ${{ github.event.pull_request.title }}
GIT_SHA: ${{ github.sha }}
run: |
# Dev branch: VERSION=dev. Main branch: parse VX.Y from commit
# message (matches the GitLab-side rule). MR-to-main uses the
# MR title's V-token, falling back to dev.
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
MSG="${{ github.event.head_commit.message }}"
VERSION=$(echo "$MSG" | grep -oE 'V[0-9]+(\.[0-9]+)*' | head -1 || true)
[ -z "$VERSION" ] && VERSION="${{ github.sha }}" && VERSION="${VERSION:0:8}"
VERSION=$(printf '%s' "$COMMIT_MESSAGE" | grep -oE 'V[0-9]+(\.[0-9]+)*' | head -1 || true)
[ -z "$VERSION" ] && VERSION="${GIT_SHA:0:8}"
elif [ "${{ github.event_name }}" = "pull_request" ]; then
VERSION=$(echo "${{ github.event.pull_request.title }}" | grep -oE 'V[0-9]+(\.[0-9]+)*' | head -1 || true)
VERSION=$(printf '%s' "$PR_TITLE" | grep -oE 'V[0-9]+(\.[0-9]+)*' | head -1 || true)
[ -z "$VERSION" ] && VERSION="dev"
else
VERSION="dev"

4
.gitmodules vendored
View File

@@ -1,4 +1,4 @@
[submodule "kicad-footprint-generator"]
path = kicad-footprint-generator
url = git@gitlab.com:acmelon/kicad-footprint-generator.git
branch = offset_fix
url = https://gitlab.com/acmelon/kicad-footprint-generator.git
branch = offset_fix