mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
fix borked Docker builds
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ COPY . .
|
||||
# Build the application
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
--mount=type=cache,target=/go/pkg \
|
||||
./build.sh build
|
||||
./build.sh build_docker
|
||||
|
||||
# Stage for creating the non-privileged user
|
||||
FROM alpine:3.20 AS user-stage
|
||||
|
||||
@@ -34,6 +34,12 @@ build() {
|
||||
CGO_ENABLED=0 go build -v -ldflags="-extldflags=-static -X codeberg.org/vnpower/pixivfe/v2/config.REVISION=${REVISION}" -o "${BINARY_NAME}"
|
||||
}
|
||||
|
||||
build_docker() {
|
||||
echo "Building ${BINARY_NAME}..."
|
||||
go mod tidy
|
||||
CGO_ENABLED=0 go build -v -ldflags="-extldflags=-static -X codeberg.org/vnpower/pixivfe/v2/config.REVISION=${REVISION}" -o "${BINARY_NAME}"
|
||||
}
|
||||
|
||||
test() {
|
||||
echo "Running tests..."
|
||||
go test ./...
|
||||
@@ -109,6 +115,7 @@ help() {
|
||||
echo " all - Run fmt, build, and test"
|
||||
echo " fmt - Format Go code"
|
||||
echo " build - Build the binary"
|
||||
echo " build_docker - Build the binary (for Docker, skips i18n refresh)"
|
||||
echo " scan - Scan Go code"
|
||||
echo " test - Run tests"
|
||||
echo " i18n - Extract i18n strings"
|
||||
@@ -135,6 +142,7 @@ execute_command() {
|
||||
case "$1" in
|
||||
fmt) fmt ;;
|
||||
build) build ;;
|
||||
build_docker) build_docker ;;
|
||||
test) test ;;
|
||||
scan) scan ;;
|
||||
i18n) i18n ;;
|
||||
|
||||
Reference in New Issue
Block a user