Skip to content

Commit 69eeeed

Browse files
committed
Change current dir for go get swagger so it doesn't modify go.mod
1 parent d9545f9 commit 69eeeed

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ generate:
102102
.PHONY: generate-swagger
103103
generate-swagger:
104104
@hash swagger > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
105+
cd .. ; \
105106
GO111MODULE="on" $(GO) get -u github.com/go-swagger/go-swagger/cmd/[email protected]; \
107+
cd gitea ; \
106108
fi
107109
swagger generate spec -o './$(SWAGGER_SPEC)'
108110
$(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
@@ -120,7 +122,9 @@ swagger-check: generate-swagger
120122
.PHONY: swagger-validate
121123
swagger-validate:
122124
@hash swagger > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
125+
cd .. ; \
123126
GO111MODULE="on" $(GO) get -u github.com/go-swagger/go-swagger/cmd/[email protected]; \
127+
cd gitea ; \
124128
fi
125129
$(SED_INPLACE) '$(SWAGGER_SPEC_S_JSON)' './$(SWAGGER_SPEC)'
126130
swagger validate './$(SWAGGER_SPEC)'

remove.me

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is a test file. Please remove me.

0 commit comments

Comments
 (0)