Improvements for Go s2i assembler (#2765)

* Return error code when compilation was not done
* Run `go mod tidy` on scaffoded code

Signed-off-by: Matej Vašek <mvasek@redhat.com>
This commit is contained in:
Matej Vašek 2025-04-02 19:17:05 +02:00 committed by GitHub
parent 9f6a135702
commit 2d3962401d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -73,9 +73,11 @@ if [[ $(go list -f {{.Incomplete}}) == "true" ]]; then
popd
exit
fi
exec /$STI_SCRIPTS_PATH/usage
/$STI_SCRIPTS_PATH/usage
exit 1
else
pushd .s2i/builds/last
go mod tidy
go build -o /opt/app-root/gobinary
popd
popd