Skip to content

Commit 13108f2

Browse files
committed
New targets.
1 parent ffb8211 commit 13108f2

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Makefile for SophoDromos Maven Plugin
22
# Provides convenient commands for development workflow
33

4-
.PHONY: help build clean test lint format publish-local check-types install deps
4+
.PHONY: help build clean test lint format publish-local check-types install deps version release just-publish publish
55

66
# Default target
77
.DEFAULT_GOAL := help
@@ -177,6 +177,25 @@ clean-all: clean ## Clean everything including IDE files
177177
rm -rf .settings/
178178
@echo "$(GREEN)✅ Everything cleaned$(RESET)"
179179

180+
version: ## Show current project version
181+
@$(MVN) help:evaluate -Dexpression=project.version -q -DforceStdout
182+
183+
release: ## Create and tag release version
184+
@echo "$(BLUE)Creating release...$(RESET)"
185+
@version=$$($(MVN) help:evaluate -Dexpression=project.version -q -DforceStdout) && \
186+
git tag -a "v$$version" -m "Release version $$version" && \
187+
echo "$(GREEN)Tagged release v$$version$(RESET)"
188+
189+
just-publish: ## Push changes and tags to origin
190+
@echo "$(BLUE)Publishing to origin...$(RESET)"
191+
@git pull origin main --rebase && \
192+
git push origin main && \
193+
git push origin main --tags
194+
@echo "$(GREEN)✅ Published to origin$(RESET)"
195+
196+
publish: clean build release just-publish ## Full publish workflow (clean, build, release, publish)
197+
@echo "$(GREEN)✅ Full publish workflow completed$(RESET)"
198+
180199
info: ## Show project information
181200
@echo "$(BLUE)Project Information$(RESET)"
182201
@echo "==================="
@@ -186,9 +205,9 @@ info: ## Show project information
186205
@echo "$(YELLOW)Target Directory:$(RESET) target/"
187206
@echo "$(YELLOW)Local Repository:$(RESET) ~/.m2/repository"
188207
@echo ""
189-
@$(MVN) help:evaluate -Dexpression=project.groupId -q -DforceStdout | xargs -I {} echo "$(YELLOW)Group ID:$(RESET) {}"
190-
@$(MVN) help:evaluate -Dexpression=project.artifactId -q -DforceStdout | xargs -I {} echo "$(YELLOW)Artifact ID:$(RESET) {}"
191-
@$(MVN) help:evaluate -Dexpression=project.version -q -DforceStdout | xargs -I {} echo "$(YELLOW)Version:$(RESET) {}"
208+
@printf "$(YELLOW)Group ID:$(RESET) %s\n" "$$($(MVN) help:evaluate -Dexpression=project.groupId -q -DforceStdout)"
209+
@printf "$(YELLOW)Artifact ID:$(RESET) %s\n" "$$($(MVN) help:evaluate -Dexpression=project.artifactId -q -DforceStdout)"
210+
@printf "$(YELLOW)Version:$(RESET) %s\n" "$$($(MVN) help:evaluate -Dexpression=project.version -q -DforceStdout)"
192211

193212
# Development shortcuts
194213
dev: quick ## Alias for quick

0 commit comments

Comments
 (0)