proper-website-2/Makefile

23 lines
631 B
Makefile
Raw Normal View History

2022-05-14 20:45:28 +02:00
APIURL_prod := https://api.quenten.nl/api
APIURL_staging := https://api.quenten.nl/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
2022-05-14 20:45:28 +02:00
build-new:
GOARCH=wasm GOOS=js go build -o web/app.wasm ./src
go build -o app ./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
2022-05-14 20:45:28 +02:00
run-new: build-new
APIURL=${APIURL_staging} ./app
2022-03-13 20:18:07 +01:00
run-prod: build-prod
2022-03-01 14:36:04 +01:00
./app