AnthoLume/Makefile

43 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

build_local: build_tailwind
go mod download
rm -r ./build
mkdir -p ./build
cp -a ./templates ./build/templates
cp -a ./assets ./build/assets
env GOOS=linux GOARCH=amd64 go build -o ./build/server_linux_amd64
env GOOS=linux GOARCH=arm64 go build -o ./build/server_linux_arm64
env GOOS=darwin GOARCH=arm64 go build -o ./build/server_darwin_arm64
env GOOS=darwin GOARCH=amd64 go build -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
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=./... ./...