2022-03-13 20:18:07 +01:00
|
|
|
APIURL_prod := https://api.nicecock.eu/api/comment
|
|
|
|
APIURL_staging := https://api.nicecock.eu/api/testingcomment
|
|
|
|
|
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
|