Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
build: skip admin and client generation on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed May 9, 2020
1 parent deb1c2e commit e8de287
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,23 @@ endif

.PHONY: admin
admin:
ifeq ($(OS),Windows_NT)
@echo "Please generate ./admin/ on macOS or Linux, currently unsupported on windows."
else
# Versions from https://github.com/OpenAPITools/openapi-generator/releases
@chmod +x ./openapi-generator
@rm -rf ./admin
OPENAPI_GENERATOR_VERSION=4.3.0 ./openapi-generator generate --package-name admin -i openapi-admin.yaml -g go -o ./admin
rm -f admin/go.mod admin/go.sum
go fmt ./...
go test ./admin
endif

.PHONY: client
client:
ifeq ($(OS),Windows_NT)
@echo "Please generate ./client/ on macOS or Linux, currently unsupported on windows."
else
# Versions from https://github.com/OpenAPITools/openapi-generator/releases
@chmod +x ./openapi-generator
@rm -rf ./client
Expand All @@ -38,6 +45,7 @@ client:
go fmt ./...
go build github.com/moov-io/customers/client
go test ./client
endif

.PHONY: clean
clean:
Expand Down

0 comments on commit e8de287

Please sign in to comment.