AnthoLume/Makefile

50 lines
1.6 KiB
Makefile
Raw Normal View History

build_local: build_tailwind
go mod download
2023-11-29 03:01:49 +00:00
rm -r ./build || true
mkdir -p ./build
env GOOS=linux GOARCH=amd64 go build -ldflags "-X reichard.io/antholume/config.version=`git describe --tags`" -o ./build/server_linux_amd64
env GOOS=linux GOARCH=arm64 go build -ldflags "-X reichard.io/antholume/config.version=`git describe --tags`" -o ./build/server_linux_arm64
env GOOS=darwin GOARCH=arm64 go build -ldflags "-X reichard.io/antholume/config.version=`git describe --tags`" -o ./build/server_darwin_arm64
env GOOS=darwin GOARCH=amd64 go build -ldflags "-X reichard.io/antholume/config.version=`git describe --tags`" -o ./build/server_darwin_amd64
docker_build_local: build_tailwind
2023-11-04 23:40:32 +00:00
docker build -t antholume:latest .
2023-09-18 23:57:18 +00:00
docker_build_release_dev: build_tailwind
2023-09-18 23:57:18 +00:00
docker buildx build \
--platform linux/amd64,linux/arm64 \
2023-11-04 23:40:32 +00:00
-t gitea.va.reichard.io/evan/antholume:dev \
2023-10-24 11:39:37 +00:00
-f Dockerfile-BuildKit \
--push .
2023-09-18 23:57:18 +00:00
docker_build_release_latest: build_tailwind
2023-09-18 23:57:18 +00:00
docker buildx build \
--platform linux/amd64,linux/arm64 \
2023-11-04 23:40:32 +00:00
-t gitea.va.reichard.io/evan/antholume:latest \
-t gitea.va.reichard.io/evan/antholume:`git describe --tags` \
2023-10-24 11:39:37 +00:00
-f Dockerfile-BuildKit \
--push .
2023-10-24 00:18:16 +00:00
build_tailwind:
2023-11-04 16:27:35 +00:00
tailwind build -o ./assets/style.css --minify
2024-02-02 00:00:02 +00:00
dev: build_tailwind
GIN_MODE=release \
CONFIG_PATH=./data \
DATA_PATH=./data \
SEARCH_ENABLED=true \
REGISTRATION_ENABLED=true \
COOKIE_SECURE=false \
COOKIE_AUTH_KEY=1234 \
LOG_LEVEL=debug go run main.go serve
clean:
rm -rf ./build
2023-10-24 00:18:16 +00:00
tests_integration:
go test -v -tags=integration -coverpkg=./... ./metadata
tests_unit:
SET_TEST=set_val go test -v -coverpkg=./... ./...