COPYRIGHT_CMD ?= docker run --rm --volume `pwd`:$(COPYRIGHT_OUTPUT_DIR) osterman/copyright-header:latest
COPYRIGHT_SOFTWARE ?= $(shell basename `pwd`)
COPYRIGHT_LICENSE ?= ASL2
COPYRIGHT_HOLDER ?= Cloud Posse, LLC <hello@cloudposse.com>
COPYRIGHT_YEAR ?= $(shell date +%Y)
COPYRIGHT_OUTPUT_DIR ?= /usr/src
COPYRIGHT_WORD_WRAP ?= 100

## Add copyright headers to source code
docs/copyright-add:
	$(call assert-set,COPYRIGHT_SOFTWARE)
	$(call assert-set,COPYRIGHT_SOFTWARE_DESCRIPTION)
	$(COPYRIGHT_CMD) \
		--license $(COPYRIGHT_LICENSE) \
		--add-path cmd:main.go \
		--guess-extension \
		--copyright-holder '$(COPYRIGHT_HOLDER)' \
		--copyright-software '$(COPYRIGHT_SOFTWARE)' \
		--copyright-software-description '$(COPYRIGHT_SOFTWARE_DESCRIPTION)' \
		--copyright-year $(COPYRIGHT_YEAR) \
		--word-wrap $(COPYRIGHT_WORD_WRAP) \
		--output-dir $(COPYRIGHT_OUTPUT_DIR) 
