Makefile: build now uses upx and CGO_ENABLED=0
This commit is contained in:
parent
c579d8e6a9
commit
9a9d5b3cec
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -38,3 +38,5 @@ public/*.min.js
|
||||||
models/
|
models/
|
||||||
|
|
||||||
/out
|
/out
|
||||||
|
|
||||||
|
/redmage
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -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_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 REDMAGE_RUNTIME_VERSION=$(shell echo "$${REDMAGE_RUNTIME_VERSION:-unknown}")
|
||||||
|
|
||||||
|
export GCO_ENABLED=0
|
||||||
|
|
||||||
start: dev-dependencies web-dependencies migrate-up
|
start: dev-dependencies web-dependencies migrate-up
|
||||||
REDMAGE_RUNTIME_VERSION=$(shell git describe --tags --abbrev=0) air
|
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
|
npx tailwindcss --minify -i views/style.css -o public/style.css
|
||||||
|
|
||||||
build: web-dependencies build-dependencies prepare
|
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:
|
build-docker:
|
||||||
goose up
|
goose up
|
||||||
|
|
Loading…
Reference in a new issue