mirror of
https://github.com/dockersrc/go
synced 2026-06-24 20:01:07 -04:00
🐛 Fix three entrypoint bugs 🐛
- CONTAINER_NAME was hardcoded to "alpine" instead of "go"; the startup
message said "alpine" for the same reason
- HEALTH_ENABLED was hard-assigned to "yes" after env files were sourced,
silently overriding the HEALTH_ENABLED="no" set in env/go.sh; changed
to ${HEALTH_ENABLED:-yes} so the env file value is respected
- go-workflow used retval (lowercase) to capture the go vet exit code but
then read retVal (uppercase) in the accumulator; the vet failure was
silently dropped and the gofmt exit code was summed twice instead
- rootfs/usr/local/bin/entrypoint.sh: fix CONTAINER_NAME default, startup
message label, and HEALTH_ENABLED hard-override
- rootfs/usr/local/bin/go-workflow: fix retval/retVal case mismatch so
go vet exit code is correctly propagated
rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/bin/go-workflow
This commit is contained in:
@@ -43,7 +43,7 @@ retVal=$?
|
||||
GO_EXITCODE=$((GO_EXITCODE + retVal))
|
||||
# 3. Catch suspicious constructs
|
||||
run_step "go vet ./..." go vet ./...
|
||||
retval=$?
|
||||
retVal=$?
|
||||
GO_EXITCODE=$((GO_EXITCODE + retVal))
|
||||
# 4. Run tests — fail fast before wasting time on a build
|
||||
run_step "go test ./..." go test ./...
|
||||
|
||||
Reference in New Issue
Block a user