From 2937c29f07e0791cd17e785356091fe7350f5fed Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Thu, 16 Apr 2026 07:59:06 -0700 Subject: [PATCH] build-agents.sh: fix VERSION parsing with awk (was broken sed backslash) Sed escape-sequence handling through the heredoc lost the \1 backreference, yielding an empty VERSION. Switched to awk -F'"' '/^version/{print $2; exit}' which is simpler and resistant to quoting. First full end-to-end signed build validated v0.6.1 deployed and verified against the Microsoft cert chain. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../guru-rmm/signing-attestation/signing-config/build-agents.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/msp-tools/guru-rmm/signing-attestation/signing-config/build-agents.sh b/projects/msp-tools/guru-rmm/signing-attestation/signing-config/build-agents.sh index 7b1a178..cb39f2d 100644 --- a/projects/msp-tools/guru-rmm/signing-attestation/signing-config/build-agents.sh +++ b/projects/msp-tools/guru-rmm/signing-attestation/signing-config/build-agents.sh @@ -19,7 +19,7 @@ cd "$REPO_DIR" sudo -u guru git fetch origin 2>&1 | tee -a "$LOG_FILE" sudo -u guru git reset --hard origin/main 2>&1 | tee -a "$LOG_FILE" -VERSION=$(grep '^version' agent/Cargo.toml | head -1 | sed 's/.*"\(.*\)".*//') +VERSION=$(awk -F'"' '/^version/{print $2; exit}' agent/Cargo.toml) log "Building version: $VERSION" # Build Linux agent