2023-10-25 23:52:01 +00:00
|
|
|
build_local: build_tailwind
|
2023-09-23 18:14:57 +00:00
|
|
|
go mod download
|
|
|
|
rm -r ./build
|
2023-09-19 23:29:55 +00:00
|
|
|
mkdir -p ./build
|
|
|
|
cp -a ./templates ./build/templates
|
|
|
|
cp -a ./assets ./build/assets
|
2023-09-23 18:14:57 +00:00
|
|
|
|
2023-10-05 23:56:19 +00:00
|
|
|
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
|
2023-09-19 23:29:55 +00:00
|
|
|
|
2023-10-25 23:52:01 +00:00
|
|
|
docker_build_local: build_tailwind
|
2023-09-19 23:29:55 +00:00
|
|
|
docker build -t bookmanager:latest .
|
2023-09-18 23:57:18 +00:00
|
|
|
|
2023-10-25 23:52:01 +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 \
|
2023-09-26 22:09:02 +00:00
|
|
|
--push .
|
2023-09-18 23:57:18 +00:00
|
|
|
|
2023-10-25 23:52:01 +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-09-26 22:09:02 +00:00
|
|
|
-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 \
|
2023-09-26 22:09:02 +00:00
|
|
|
--push .
|
2023-10-24 00:18:16 +00:00
|
|
|
|
2023-10-25 23:52:01 +00:00
|
|
|
build_tailwind:
|
2023-11-04 16:27:35 +00:00
|
|
|
tailwind build -o ./assets/style.css --minify
|
2023-10-25 23:52:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
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=./... ./...
|