proper-website-2/Makefile

16 lines
494 B
Makefile
Raw Normal View History

APIURL_prod := https://api.nicecock.eu/api
APIURL_staging := https://api.nicecock.eu/api/testing
2022-03-13 20:18:07 +01:00
2022-03-01 14:36:04 +01:00
build:
2022-03-15 12:48:47 +01:00
GOARCH=wasm GOOS=js go build -o web/app.wasm -ldflags="-X 'main.ApiURL=${APIURL_staging}'" ./src
go build -o app -ldflags="-X 'main.ApiURL=${APIURL_staging}'" ./src
2022-03-13 20:18:07 +01:00
build-prod:
2022-03-15 12:48:47 +01:00
GOARCH=wasm GOOS=js go build -o web/app.wasm -ldflags="-X 'main.ApiURL=${APIURL_prod}'" ./src
go build -o app -ldflags="-X 'main.ApiURL=${APIURL_prod}'" ./src
2022-03-01 14:36:04 +01:00
run: build
2022-03-13 20:18:07 +01:00
./app
run-prod: build-prod
2022-03-01 14:36:04 +01:00
./app