changed builder image
All checks were successful
Build Builder Docker Image / create-builder-docker-image (push) Successful in 5m42s
All checks were successful
Build Builder Docker Image / create-builder-docker-image (push) Successful in 5m42s
This commit is contained in:
19
scripts/quick-build.sh
Normal file
19
scripts/quick-build.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -f go.mod ]; then
|
||||
echo "go.mod not found in current directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Проверяем, изменились ли зависимости
|
||||
if [ ! -f go.sum ] || ! go mod verify >/dev/null 2>&1; then
|
||||
echo "Dependencies changed, downloading..."
|
||||
go mod download
|
||||
fi
|
||||
|
||||
# Собираем для указанной платформы
|
||||
if [ -n "$1" ] && [ -n "$2" ]; then
|
||||
GOOS=$1 GOARCH=$2 go build -o "hello-api-$1-$2" main.go
|
||||
else
|
||||
go build -o hello-api main.go
|
||||
fi
|
Reference in New Issue
Block a user