adapt makefile

This commit is contained in:
lyx0 2023-03-03 21:16:00 +00:00
parent 4d87614126
commit f57776aaf3
2 changed files with 11 additions and 13 deletions

4
.gitignore vendored
View file

@ -16,7 +16,11 @@
.env
Nourybot
Nourybot.out
Nourybot-Api
Nourybot-Api.out
NourybotApi
NourybotApi.out
nourybot-api
Nourybot-Web
nourybot-web

View file

@ -1,24 +1,18 @@
BINARY_NAME=Nourybot.out
BINARY_NAME_API=NourybotApi.out
jqapi:
cd cmd/api && go build -o Nourybot-Api && ./Nourybot-Api | jq
go build -o ${BINARY_NAME_API} cmd/api
./${BINARY_NAME} | jq
xd:
go build -o ${BINARY_NAME} cmd/bot/main.go
./${BINARY_NAME} -env="dev"
cd cmd/bot && go build -o ${BINARY_NAME} && ./${BINARY_NAME} -env="dev"
xdprod:
go build -o ${BINARY_NAME} cmd/bot/main.go
./${BINARY_NAME} -env="prod"
cd cmd/bot && go build -o ${BINARY_NAME} && ./${BINARY_NAME} -env="prod"
jq:
go build -o ${BINARY_NAME} cmd/bot/main.go
./${BINARY_NAME} -env="dev" | jq
cd cmd/bot && go build -o ${BINARY_NAME} && ./${BINARY_NAME} -env="dev" | jq
jqprod:
go build -o ${BINARY_NAME} cmd/bot/main.go
./${BINARY_NAME} -env="prod" | jq
cd cmd/bot && go build -o ${BINARY_NAME} && ./${BINARY_NAME} -env="prod" | jq
jqapi:
go build -o ${BINARY_NAME_API} cmd/api && ./${BINARY_NAME} | jq