diff options
author | Richard Mahn <richmahn@users.noreply.github.com> | 2019-04-01 11:27:40 -0400 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-04-01 23:27:40 +0800 |
commit | 4e3ce71ac989e8d555a49e057203e0185243656e (patch) | |
tree | 20916f60d26976bb97a362a65bc24867674330f9 /Makefile | |
parent | dbba46c2161c673b7818b6602ea2fb4efffe224e (diff) | |
download | gitea-4e3ce71ac989e8d555a49e057203e0185243656e.tar.gz gitea-4e3ce71ac989e8d555a49e057203e0185243656e.zip |
Fies #6468 - Uses space match and adds newline for all sed flavors (#6473)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -46,8 +46,9 @@ TAGS ?= TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'gitea-temp') SWAGGER_SPEC := templates/swagger/v1_json.tmpl -SWAGGER_SPEC_S_TMPL := s|"basePath":\s*"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g -SWAGGER_SPEC_S_JSON := s|"basePath":\s*"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g +SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g +SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g +SWAGGER_NEWLINE_COMMAND := -e '$$a\' TEST_MYSQL_HOST ?= mysql:3306 TEST_MYSQL_DBNAME ?= testgitea @@ -111,6 +112,7 @@ generate-swagger: fi swagger generate spec -o './$(SWAGGER_SPEC)' $(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)' + $(SED_INPLACE) $(SWAGGER_NEWLINE_COMMAND) './$(SWAGGER_SPEC)' .PHONY: swagger-check swagger-check: generate-swagger |