gouick/templates/go-swagger/custom/Makefile.tmpl
Matthieu 'JP' DERASSE 65add2a61d
Some checks failed
continuous-integration/drone/push Build is failing
feat(go-swagger): Refactoring to use go-swagger templating system for most of the work
2023-01-01 17:06:47 +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