diff --git a/makefiles/Shipkit-main.make b/makefiles/Shipkit-main.make index a266b70..929aedd 100644 --- a/makefiles/Shipkit-main.make +++ b/makefiles/Shipkit-main.make @@ -121,7 +121,7 @@ uc = $(call _awk_case,toupper,$(1)) $(BUILD_DIR):: mkdir -p $@ -## Make it so +# Make it so ship-it:: diff --git a/makefiles/gradle-tools.make b/makefiles/gradle-tools.make index 8428ee8..df0f545 100644 --- a/makefiles/gradle-tools.make +++ b/makefiles/gradle-tools.make @@ -9,19 +9,16 @@ gradle_properties ?= gradle.properties build_gradle ?= build.gradle -## runs codenarc and spotless +## runs codenarc and spotless with spotlessApply to fix any format issues lint:: $(gradlew) spotlessApply $(gradlew) codenarcMain -# Run the lint and test suite with ./gradlew check -# check:: -# $(gradlew) spotlessApply -# $(gradlew) check - +## clean the build clean:: $(gradlew) clean +## compile apps. calls ./gradlew classes. compile:: $(gradlew) classes @@ -31,6 +28,7 @@ build:: testArg := $(if $(tests),--tests *$(tests)*, ) +# runs both test and integrationTest. test:: $(gradlew) test integrationTest @@ -42,24 +40,32 @@ test.unit:: test.e2e:: $(gradlew) integrationTest $(testArg) +## show help list for test targets +help.test: + $(MAKE) help HELP_REGEX="^test.*" + +test.help: help.test + # verifies the snapshot is set _verify-snapshot: FORCE _=$(if $(IS_SNAPSHOT),,$(error set snapshot=true in version properties)) -## publish snapshot(s) jars into you local maven -publish.snapshot: | _verify-snapshot - $(gradlew) snapshot - # here so we can depend on it being there and if not firing assemble $(APP_JAR): $(gradlew) assemble -## java runs the APP_JAR +# java runs the APP_JAR start.jar: $(APP_JAR) java -server -Xmx3048m -XX:MaxMetaspaceSize=256m -jar $(APP_JAR) .PHONY: resolve-dependencies merge-test-results +## show help list for gradle targets +help.gradle: + $(MAKE) help HELP_REGEX="^gradle.*" + +gradle.help: help.gradle + # calls `gradlew resolveConfigurations` to download deps without compiling, used mostly for CI cache gradle.resolve-dependencies: $(gradlew) resolveConfigurations --no-daemon @@ -80,14 +86,23 @@ gradle.cache-key-file: | _verify_PROJECT_SUBPROJECTS done $(logr.done) +# publish the library jar, calls gradle publish, alias to publish.libs +gradle.publish.libs: publish.libs + +# publish snapshot(s) jars into you local maven +gradle.snapshot: | _verify-snapshot + $(gradlew) snapshot + +## publish snapshot(s) jars into you local maven, alias to gradle.snapshot +publish.snapshot: gradle.snapshot + # legacy calls with no namespace resolve-dependencies: gradle.resolve-dependencies +# alias to gradle.cache-key-file cache-key-file: gradle.cache-key-file -merge-test-results: gradle.merge-test-results - -## publish the library jar, calls gradle publish +# publish the library jar, calls gradle publish publish.libs: if [ "$(IS_SNAPSHOT)" ]; then $(logr) "publishing SNAPSHOT"; else $(logr) "publishing release"; fi if [ "$(dry_run)" ]; then diff --git a/makefiles/jbuilder-docker.make b/makefiles/jdk-docker.make similarity index 88% rename from makefiles/jbuilder-docker.make rename to makefiles/jdk-docker.make index bd58e3f..34c8c72 100644 --- a/makefiles/jbuilder-docker.make +++ b/makefiles/jdk-docker.make @@ -7,7 +7,7 @@ JBUILDER_NAME := $(PROJECT_NAME)_jbuilder JBUILDER_COMPOSE_FILE ?= ./jbuilder-compose.yml JBUILDER_COMPOSE_CMD := JBUILDER_NAME=$(JBUILDER_NAME) docker compose -p $(JBUILDER_NAME)_servers -f $(JBUILDER_COMPOSE_FILE) -## docker compose for jbuilder-compose.yml, follow with the docker cmd such as up, down, shell or pull +# docker compose for jbuilder-compose.yml, follow with the docker cmd such as up, down, shell or pull docker.jbuilder: | _verify-DOCKER_CMD $(MAKE) jbuilder-$(DOCKER_CMD) diff --git a/makefiles/ship-gh-pages.make b/makefiles/ship-gh-pages.make index f606724..d5f1217 100644 --- a/makefiles/ship-gh-pages.make +++ b/makefiles/ship-gh-pages.make @@ -8,7 +8,7 @@ docmark.publish-prep: docmark.build git.clone-pages cp -r $(GROOVYDOC_BUILD_DIR) $(PAGES_BUILD_DIR)/groovydocs fi -## Builds and pushes docmark pages to github pages, CI should call publish-docs which calls this +# Builds and pushes docmark pages to github pages, CI should call publish-docs which calls this pages.deploy-github: docmark.publish-prep if [ "$(dry_run)" ]; then echo "🌮 dry_run -> $(MAKE) git.push-pages" diff --git a/makefiles/spring-common.make b/makefiles/spring-common.make index bf67008..6779750 100644 --- a/makefiles/spring-common.make +++ b/makefiles/spring-common.make @@ -7,7 +7,7 @@ include $(SHIPKIT_MAKEFILES)/git-tools.make include $(SHIPKIT_MAKEFILES)/docker.make include $(SHIPKIT_MAKEFILES)/kubectl-config.make include $(SHIPKIT_MAKEFILES)/kube.make -include $(SHIPKIT_MAKEFILES)/jbuilder-docker.make +include $(SHIPKIT_MAKEFILES)/jdk-docker.make include $(SHIPKIT_MAKEFILES)/gradle-tools.make include $(SHIPKIT_MAKEFILES)/spring-docker.make include $(SHIPKIT_MAKEFILES)/docmark.make diff --git a/makefiles/spring-docker.make b/makefiles/spring-docker.make index 12b0f8b..425052e 100644 --- a/makefiles/spring-docker.make +++ b/makefiles/spring-docker.make @@ -50,14 +50,14 @@ build/docker_push_$(APP_KEY): $(BUILD_DIR)/docker_built_$(APP_KEY) | _verify_APP fi .PHONY: docker.app-push -## builds and deploys whats in the src/deploy for the APP_DOCKER_URL to docker hub +# builds and deploys whats in the src/deploy for the APP_DOCKER_URL to docker hub docker.app-push: $(BUILD_DIR)/docker_push_$(APP_KEY) APP_COMPOSE_FILE ?= $(build_docker_dir)/docker-compose.yml APP_COMPOSE_CMD := APP_DOCKER_URL=$(APP_DOCKER_URL) APP_NAME=$(APP_NAME) docker compose -p $(APP_NAME)_servers -f $(APP_COMPOSE_FILE) APP_COMPOSE_CLEAN_FLAGS ?= --volumes --remove-orphans -## docker compose for the runnable jar, follow with a docker cmd such as up, down, shell or pull +# docker compose for the runnable jar, follow with a docker cmd such as up, down, shell or pull docker.app: | _verify-DOCKER_CMD $(MAKE) docker.app-$(DOCKER_CMD) @@ -69,6 +69,7 @@ docker.app-up: build/docker_built_$(APP_KEY) docker.app-down: $(APP_COMPOSE_CMD) down $(APP_COMPOSE_CLEAN_FLAGS) +# open docker shell for app docker.app-shell: docker.app-up docker exec -it $(APP_NAME) bash -l diff --git a/version.properties b/version.properties index 1552159..786e351 100644 --- a/version.properties +++ b/version.properties @@ -8,4 +8,4 @@ publishedVersion=2.0.3 # when this is false will append -SNAPSHOT to version and if on publishable branch will 'publish' to snapshotUrl # when true IS_RELEASEBALE will be set and will go through full release process cycle to # automatically bump version and push a v tag to github -release=false +release=true