AnthoLume/Makefile

43 lines
1.1 KiB
Makefile
Raw 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
docker build -t bookmanager: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-09-26 23:44:20 +00:00
-t gitea.va.reichard.io/evan/bookmanager: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 \
-t gitea.va.reichard.io/evan/bookmanager:latest \
2023-09-26 23:44:20 +00:00
-t gitea.va.reichard.io/evan/bookmanager:`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:
tailwind build -o ./assets/style.css
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=./... ./...