diff options
-rw-r--r-- | Makefile.doc | 6 | ||||
-rw-r--r-- | Makefile.release | 16 |
2 files changed, 18 insertions, 4 deletions
diff --git a/Makefile.doc b/Makefile.doc index bafe55a67..5676bee3a 100644 --- a/Makefile.doc +++ b/Makefile.doc @@ -6,7 +6,13 @@ READMES:=$(subst /README.md,,$(READMES)) PLUGINS:=$(subst plugin/,corendns-,$(PLUGINS)) PLUGINS:=$(subst /README.md,(7),$(PLUGINS)) +ifeq (, $(shell which ronn)) + $(warning "No ronn in $$PATH, exiting") +all: + @echo "noop" +else all: man/coredns.1 man/corefile.5 plugins +endif man/coredns.1: coredns.1.md sed -e 's/^\(#.*\)/\U\1/' $< > $@.md diff --git a/Makefile.release b/Makefile.release index 4b64e55ec..4e27f5cb5 100644 --- a/Makefile.release +++ b/Makefile.release @@ -21,8 +21,11 @@ # * Get an access token: https://help.github.com/articles/creating-an-access-token-for-command-line-use/ # * export GITHUB_ACCESS_TOKEN=<token> # * Up the version in coremain/version.go -# * Run: make -f Makefile.release release -# * will *commit* your change with 'Release $VERSION' +# * Run: make DOCKER=coredns -f Makefile.release release +# * runs make -f Makefile.doc +# * this is a noop if ronn can't be found +# * perform a go generate +# * will *commit* your change(s) with 'Release $VERSION' # * push to github # * build the release and do all that fluff. # @@ -61,16 +64,21 @@ LINUX_ARCH:=amd64 arm arm64 ppc64le s390x PLATFORMS:=$(subst $(SPACE),$(COMMA),$(foreach arch,$(LINUX_ARCH),linux/$(arch))) ifeq ($(DOCKER),) - $(error "Please specify Docker registry to use. Use \"coredns\" for releases") + $(error "Please specify Docker registry to use. Use DOCKER=coredns for releases") endif all: @echo Use the 'release' target to start a release -release: commit push build tar upload +release: pre commit push build tar upload docker: docker-build docker-push +.PHONY: pre +pre: + go generate + $(MAKE) -f Makefile.doc + .PHONY: push push: @echo Pushing release to master |