Skip to content

Commit e54f881

Browse files
committed
Update validation script to match new asset list
Removed validation checks for standalone binaries that are no longer uploaded to GitHub releases. These binaries are only needed in Docker images for the /download/ endpoint. Updated required assets list to include all versioned tarballs/zips instead of standalone binaries.
1 parent b6aa1fe commit e54f881

File tree

1 file changed

+16
-67
lines changed

1 file changed

+16
-67
lines changed

scripts/validate-release.sh

Lines changed: 16 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -135,22 +135,27 @@ pushd "$RELEASE_DIR" >/dev/null
135135

136136
# Validate all expected release assets exist
137137
info "Checking required release assets..."
138+
# NOTE: Standalone binaries are NOT in GitHub releases
139+
# They are only included in Docker images for /download/ endpoints
138140
required_assets=(
139141
"install.sh"
140142
"checksums.txt"
141143
"pulse-v${PULSE_VERSION}.tar.gz"
142144
"pulse-v${PULSE_VERSION}-linux-amd64.tar.gz"
143145
"pulse-v${PULSE_VERSION}-linux-arm64.tar.gz"
144146
"pulse-v${PULSE_VERSION}-linux-armv7.tar.gz"
147+
"pulse-v${PULSE_VERSION}-linux-armv6.tar.gz"
148+
"pulse-v${PULSE_VERSION}-linux-386.tar.gz"
149+
"pulse-host-agent-v${PULSE_VERSION}-darwin-amd64.tar.gz"
145150
"pulse-host-agent-v${PULSE_VERSION}-darwin-arm64.tar.gz"
146-
"pulse-host-agent-linux-amd64"
147-
"pulse-host-agent-linux-arm64"
148-
"pulse-host-agent-linux-armv7"
149-
"pulse-host-agent-darwin-arm64"
150-
"pulse-host-agent-windows-amd64.exe"
151-
"pulse-sensor-proxy-linux-amd64"
152-
"pulse-sensor-proxy-linux-arm64"
153-
"pulse-sensor-proxy-linux-armv7"
151+
"pulse-host-agent-v${PULSE_VERSION}-linux-amd64.tar.gz"
152+
"pulse-host-agent-v${PULSE_VERSION}-linux-arm64.tar.gz"
153+
"pulse-host-agent-v${PULSE_VERSION}-linux-armv7.tar.gz"
154+
"pulse-host-agent-v${PULSE_VERSION}-linux-armv6.tar.gz"
155+
"pulse-host-agent-v${PULSE_VERSION}-linux-386.tar.gz"
156+
"pulse-host-agent-v${PULSE_VERSION}-windows-amd64.zip"
157+
"pulse-host-agent-v${PULSE_VERSION}-windows-arm64.zip"
158+
"pulse-host-agent-v${PULSE_VERSION}-windows-386.zip"
154159
)
155160

156161
missing_count=0
@@ -194,47 +199,11 @@ success "Universal tarball validated"
194199
tar -tzf "pulse-host-agent-v${PULSE_VERSION}-darwin-arm64.tar.gz" pulse-host-agent-darwin-arm64 >/dev/null 2>&1 || { error "macOS tarball validation failed"; exit 1; }
195200
success "macOS host-agent tarball validated"
196201

197-
# Validate checksums exist for all distributable assets
202+
# Validate checksums.txt
198203
info "Validating checksums..."
199-
checksum_errors=0
200-
for asset in *.tar.gz *.zip *.tgz install.sh pulse-sensor-proxy-linux-* pulse-host-agent-linux-* pulse-host-agent-darwin-* pulse-host-agent-windows-*.exe; do
201-
# Skip checksum files themselves
202-
[[ "$asset" == *.sha256 ]] && continue
203-
204-
if [ ! -f "${asset}.sha256" ]; then
205-
error "Missing checksum file: ${asset}.sha256"
206-
checksum_errors=$((checksum_errors + 1))
207-
else
208-
# Verify checksum
209-
sha256sum -c "${asset}.sha256" >/dev/null 2>&1 || { error "Checksum verification failed for $asset"; checksum_errors=$((checksum_errors + 1)); }
210-
fi
211-
done
212-
213-
if [ $checksum_errors -gt 0 ]; then
214-
error "$checksum_errors checksum validation failures"
215-
exit 1
216-
fi
217-
success "All individual checksums present and verified"
218-
219-
# Validate combined checksums.txt
220204
sha256sum -c checksums.txt >/dev/null 2>&1 || { error "checksums.txt validation failed"; exit 1; }
221205
success "checksums.txt validated"
222206

223-
# Validate architecture of standalone binaries (requires 'file' command)
224-
if command -v file >/dev/null 2>&1; then
225-
info "Validating binary architectures..."
226-
227-
file pulse-host-agent-linux-amd64 | grep -qF 'ELF 64-bit' | grep -qF 'x86-64' || warn "pulse-host-agent-linux-amd64 architecture check failed"
228-
file pulse-host-agent-linux-arm64 | grep -qF 'ELF 64-bit' | grep -qF 'aarch64' || warn "pulse-host-agent-linux-arm64 architecture check failed"
229-
file pulse-host-agent-linux-armv7 | grep -qF 'ELF 32-bit' | grep -qF 'ARM' || warn "pulse-host-agent-linux-armv7 architecture check failed"
230-
file pulse-host-agent-darwin-amd64 | grep -qF 'Mach-O' | grep -qF 'x86_64' || warn "pulse-host-agent-darwin-amd64 architecture check failed"
231-
file pulse-host-agent-darwin-arm64 | grep -qF 'Mach-O' | grep -qF 'arm64' || warn "pulse-host-agent-darwin-arm64 architecture check failed"
232-
file pulse-host-agent-windows-amd64.exe | grep -qF 'PE32+' | grep -qF 'x86-64' || warn "pulse-host-agent-windows-amd64.exe architecture check failed"
233-
file pulse-host-agent-windows-arm64.exe | grep -qF 'PE32+' | grep -qF 'Aarch64' || warn "pulse-host-agent-windows-arm64.exe architecture check failed"
234-
235-
success "Binary architectures validated"
236-
fi
237-
238207
popd >/dev/null
239208

240209
echo ""
@@ -273,28 +242,8 @@ success "Extracted VERSION file: $PULSE_VERSION"
273242

274243
echo ""
275244

276-
#=============================================================================
277-
# STANDALONE BINARY VALIDATION
278-
#=============================================================================
279-
info "=== Standalone Binary Validation ==="
280-
281-
info "Testing standalone binaries in release directory..."
282-
283-
# Host agent
284-
"$RELEASE_DIR/pulse-host-agent-linux-amd64" --version 2>/dev/null | grep -Fx "$PULSE_TAG" >/dev/null || { error "Standalone host-agent version mismatch"; exit 1; }
285-
success "Standalone host-agent: $PULSE_TAG"
286-
287-
# Sensor proxy
288-
"$RELEASE_DIR/pulse-sensor-proxy-linux-amd64" version 2>/dev/null | grep -Fx "pulse-sensor-proxy $PULSE_TAG" >/dev/null || { error "Standalone sensor-proxy version mismatch"; exit 1; }
289-
success "Standalone sensor-proxy: $PULSE_TAG"
290-
291-
# Docker agent (built for all 3 architectures)
292-
for arch in linux-amd64 linux-arm64 linux-armv7; do
293-
if [ -f "$RELEASE_DIR/pulse-docker-agent-$arch" ]; then
294-
grep -aF "$PULSE_TAG" "$RELEASE_DIR/pulse-docker-agent-$arch" >/dev/null || { error "Standalone docker-agent-$arch version string not found"; exit 1; }
295-
fi
296-
done
297-
success "Standalone docker-agent binaries contain: $PULSE_TAG"
245+
# NOTE: Standalone binary validation removed - they are NOT in GitHub releases
246+
# They are only included in Docker images for /download/ endpoints
298247

299248
echo ""
300249

0 commit comments

Comments
 (0)