Conversation
| cat ${SOURCE_DIR}/templates/gradle-maven-publish.template >> ${TARGET_DIR}/build.gradle | ||
|
|
||
| .PHONY: customise-build-gradle | ||
|
|
There was a problem hiding this comment.
I think for using this locally it would be nice to have an additional target that does all three existing targets in one, basically mimicking the jenkins stage where they are being called in.
And if you want to be fancy you could add a help target ;-)
There was a problem hiding this comment.
In case you have no help target at hand, I used this code once in the past:
### Based on https://gist.github.com/prwhite/8168133#gistcomment-2278355
# COLORS
GREEN := $(shell tput -Txterm setaf 2)
YELLOW := $(shell tput -Txterm setaf 3)
WHITE := $(shell tput -Txterm setaf 7)
RESET := $(shell tput -Txterm sgr0)
## Show this help
help:
@echo ''
@echo 'Usage:'
@echo ' make <${GREEN}target${RESET}>'
@echo ''
@echo 'Targets:'
@awk '/^[0-9a-zA-Z_-]+:|^# .*/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")-1); \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
printf " ${GREEN}%-30s${RESET} %s\n", helpCommand, helpMessage; \
} else { \
printf "\n"; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
.PHONY: help
There was a problem hiding this comment.
FYI I've switched to this short version lately: https://github.com/opendevstack/ods-pipeline/blob/master/Makefile#L15
There was a problem hiding this comment.
FYI I've switched to this short version lately: https://github.com/opendevstack/ods-pipeline/blob/master/Makefile#L15
cool! but this does require having awk installed, no? Not every unix distro has it installed out of the box AFAIK.
There was a problem hiding this comment.
wait, I think I'm mixing this up now with another unix tool
There was a problem hiding this comment.
cool, I'll add this and also one target that calls all other.
@michaelsauter @renedupont do you think it might be worth to rename the target names to reflect some sort of standard targets/interface? Like create-project (calls all targets), create-project-template, update-project-template, etc...?
There was a problem hiding this comment.
yes why not
you only have to come up with names that fit all quickstarters :)
It is already hard for this qs here - if I see it right you would rename the current create-project target into create-project-template, but from my point of view what is actually happening in their is not a creation of a template but rather the initialization of the project (the service is calles spring initializr).
fixes #761