Makefile: build now uses upx and CGO_ENABLED=0

This commit is contained in:
Tigor Hutasuhut 2024-06-11 13:10:42 +07:00
parent c579d8e6a9
commit 9a9d5b3cec
3 changed files with 9 additions and 1 deletions

2
.gitignore vendored
View file

@ -38,3 +38,5 @@ public/*.min.js
models/
/out
/redmage

View file

@ -12,6 +12,8 @@ export REDMAGE_WEB_DEPENDENCIES_DAYJS_VERSION=$(shell echo "$${REDMAGE_WEB_DEPEN
export REDMAGE_WEB_DEPENDENCIES_ALPINEJS_VERSION=$(shell echo "$${REDMAGE_WEB_DEPENDENCIES_ALPINEJS_VERSION:-3.13.10}")
export REDMAGE_RUNTIME_VERSION=$(shell echo "$${REDMAGE_RUNTIME_VERSION:-unknown}")
export GCO_ENABLED=0
start: dev-dependencies web-dependencies migrate-up
REDMAGE_RUNTIME_VERSION=$(shell git describe --tags --abbrev=0) air
@ -84,7 +86,10 @@ web-build-docker:
npx tailwindcss --minify -i views/style.css -o public/style.css
build: web-dependencies build-dependencies prepare
go build -o redmage
go build -ldflags="-s -w" -o redmage
build-prod: build
upx -9 redmage
build-docker:
goose up

View file

@ -20,6 +20,7 @@
nodePackages_latest.nodejs
goose
air
upx
];
};
};