1
1
# Makefile for SophoDromos Maven Plugin
2
2
# Provides convenient commands for development workflow
3
3
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
5
5
6
6
# Default target
7
7
.DEFAULT_GOAL := help
@@ -177,6 +177,25 @@ clean-all: clean ## Clean everything including IDE files
177
177
rm -rf .settings/
178
178
@echo " $( GREEN) ✅ Everything cleaned$( RESET) "
179
179
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
+
180
199
info : # # Show project information
181
200
@echo " $( BLUE) Project Information$( RESET) "
182
201
@echo " ==================="
@@ -186,9 +205,9 @@ info: ## Show project information
186
205
@echo " $( YELLOW) Target Directory:$( RESET) target/"
187
206
@echo " $( YELLOW) Local Repository:$( RESET) ~/.m2/repository"
188
207
@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) "
192
211
193
212
# Development shortcuts
194
213
dev : quick # # Alias for quick
0 commit comments