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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user