gouick/templates/go-swagger/Makefile.tmpl
Matthieu 'JP' DERASSE edbd97705a
Some checks failed
continuous-integration/drone/push Build is failing
feat(go-swagger): Improve Makefile
2022-09-26 19:36:54 +00:00

50 lines
1.4 KiB
Cheetah

# Code generated by gouick; DO NOT EDIT.
{{ if eq (len .APIs) 1 }}
api:
@echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@echo "\tLaunch API '{{ (index .APIs 0).Binary }}'"
@echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@PORT=${PORT:-3000} HOST=${HOST:-0.0.0.0} \
go run cmd/{{ (index .APIs 0).Binary }}/*
{{ else if gt (len .APIs) 1 }}
{{- range .APIs -}}
{{.Binary}}
{{ end }}:
@echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@echo "\tLaunch API '$@'"
@echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@PORT=${PORT:-3000} HOST=${HOST:-0.0.0.0} \
go run cmd/$@/main.go
{{ end }}
{{- if ne (len .Workers) 0 }}
{{- range .Workers -}}
{{.Binary}}
{{ end }}:
@echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@echo "\tLaunch worker '$@'"
@echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@PORT=${PORT:-3000} HOST=${HOST:-0.0.0.0} \
go run cmd/$@/main.go
{{ end }}
{{- if ne (len .Crons) 0 }}
{{- range .Crons -}}
{{.Binary}}
{{ end }}:
@echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@echo "\tLaunch cron '$@'"
@echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@PORT=${PORT:-3000} HOST=${HOST:-0.0.0.0} \
go run cmd/$@/main.go
{{ end }}
generate:
@gouick generate
test:
@gouick test
.PHONY: api generate test