Skip to content

#1594: Implement release commandlet - #2023

Merged
hohwille merged 19 commits into
devonfw:mainfrom
laert-ll:feature/1594-implement-release-commandlet
Jul 20, 2026
Merged

#1594: Implement release commandlet#2023
hohwille merged 19 commits into
devonfw:mainfrom
laert-ll:feature/1594-implement-release-commandlet

Conversation

@laert-ll

@laert-ll laert-ll commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #1594

Implemented changes:

  • Added ide release commandlet that automates building and deploying a release: derives the release version from .mvn/maven.config (-Drevision=), commits and tags it, runs the Maven deploy build, bumps to the next -SNAPSHOT version, and pushes after confirmation.
  • Guards: aborts on uncommitted changes, warns when run on a fork, and requires the top-level project (or --force).
  • Build goals are configurable via MVN_RELEASE_OPTS (default clean deploy -Dchangelist= -Pdeploy); failed builds can be retried.
  • Added commit, tag, push, and retrieveGitRemotes to GitContext.

Testing instructions

  1. In a project using -Drevision= versioning (e.g. IDEasy itself), run ide release from the project root.
  2. Confirm it proposes the correct release/next versions, then creates the set release version commit + release/ tag, builds, and creates the set next version commit.
  3. Answer no at the final "Do you want to continue?" prompt to abort before pushing — verify nothing is pushed. To clean up: git reset --hard HEAD~2 && git tag -d release/.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Jun 15, 2026
@laert-ll laert-ll self-assigned this Jun 15, 2026
@laert-ll
laert-ll force-pushed the feature/1594-implement-release-commandlet branch from 13ab4c6 to d28f993 Compare June 15, 2026 13:26
@laert-ll laert-ll moved this from 🆕 New to 🏗 In progress in IDEasy board Jun 16, 2026
@laert-ll
laert-ll force-pushed the feature/1594-implement-release-commandlet branch from d491923 to 0547ac4 Compare June 16, 2026 10:42
@laert-ll
laert-ll force-pushed the feature/1594-implement-release-commandlet branch from 78e6ead to d9c6911 Compare June 25, 2026 07:19
@coveralls

coveralls commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 29771184973

Coverage decreased (-0.009%) to 72.504%

Details

  • Coverage decreased (-0.009%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 78 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

78 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/git/GitContextImpl.java 50 36.75%
com/devonfw/tools/ide/tool/mvn/Mvn.java 17 80.18%
com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java 7 91.87%
com/devonfw/tools/ide/git/GitContext.java 4 61.54%

Coverage Stats

Coverage Status
Relevant Lines: 16905
Covered Lines: 12777
Line Coverage: 75.58%
Relevant Branches: 7546
Covered Branches: 4951
Branch Coverage: 65.61%
Branches in Coverage %: Yes
Coverage Strength: 3.2 hits per line

💛 - Coveralls

@laert-ll
laert-ll marked this pull request as ready for review June 26, 2026 08:35
@laert-ll laert-ll moved this from 🏗 In progress to Team Review in IDEasy board Jun 26, 2026
@laert-ll laert-ll added release related to release commandlet and releases of IDEasy commandlet ide sub-command git git version management tool integration devonfw-ide backward compatibility for devonfw-ide (regression) labels Jul 9, 2026
@hohwille hohwille added this to the release:2026.07.002 milestone Jul 10, 2026
@hohwille hohwille moved this from Team Review to 👀 In review in IDEasy board Jul 10, 2026

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laert-ll thank you for your PR. Great work 👍
Since this was somehow stuck in team-review without a reviewer assigned and I came across, I took the fast lane and moved it to the final review.
Regarding my reivew comments you did nothing wrong. I just want to improve the design for better SoC, reuse and maintainability.

Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/ReleaseCommandlet.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/commandlet/ReleaseCommandlet.java Outdated
Comment thread cli/src/main/resources/nls/Help.properties Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/git/GitContextImpl.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/git/GitContextImpl.java Outdated
Comment thread cli/src/test/java/com/devonfw/tools/ide/git/GitContextMock.java Outdated
Comment thread CHANGELOG.adoc Outdated
@laert-ll
laert-ll force-pushed the feature/1594-implement-release-commandlet branch from c0cffeb to b428647 Compare July 19, 2026 14:56
@laert-ll
laert-ll force-pushed the feature/1594-implement-release-commandlet branch from 1ead270 to 748c81d Compare July 20, 2026 12:03
@hohwille
hohwille merged commit 3221b75 into devonfw:main Jul 20, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in IDEasy board Jul 20, 2026
@laert-ll laert-ll added the QA approved Label a PR that has been re-testet via nightly SNAPSHOT after merge and commented. label Jul 21, 2026
@laert-ll

Copy link
Copy Markdown
Contributor Author

Successfully tested on 2026.07.002-07_21_05-SNAPSHOT:

[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.913 s -- in com.devonfw.tools.ide.commandlet.ReleaseCommandletTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.282 s -- in com.devonfw.tools.ide.tool.mvn.MvnTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0

Testing in throwaway ci-friendly project:

Current version: 1.0.2-SNAPSHOT
Release version: 1.0.2
Next version: 1.0.3-SNAPSHOT
Is the next version '1.0.3-SNAPSHOT' correct?
Is the next version '1.0.3-SNAPSHOT' correct?
Option 1: yes
Option 2: no
yes
Overriding content of file /home/laert/projects/IDEasy/workspaces/main/reltest-sandbox/reltest/.mvn/maven.config
[main 8c63fe2] set release version to 1.0.2
 1 file changed, 1 insertion(+), 1 deletion(-)
Overriding content of file /home/laert/projects/IDEasy/workspaces/main/reltest-sandbox/reltest/.mvn/maven.config
[main 591ec15] set next version to 1.0.3-SNAPSHOT
 1 file changed, 1 insertion(+), 1 deletion(-)
Local commits and tag need to be pushed now.
You now have the chance to review these changes manually before they are pushed.
Do you want to continue?
Do you want to continue?
Option 1: yes
Option 2: no
yes
Enumerating objects: 12, done.
Counting objects: 100% (12/12), done.
Delta compression using up to 8 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (9/9), 962 bytes | 962.00 KiB/s, done.
Total 9 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To /home/laert/projects/IDEasy/workspaces/main/reltest-sandbox/origin.git
   68b764e..591ec15  main -> main
 * [new tag]         release/1.0.2 -> release/1.0.2
Successfully released version 1.0.2.
591ec15 (HEAD -> main, origin/main) set next version to 1.0.3-SNAPSHOT
8c63fe2 (tag: release/1.0.2) set release version to 1.0.2
68b764e set next version to 1.0.2-SNAPSHOT
f08a6c6 (tag: release/1.0.1) set release version to 1.0.1
baaaa53 set next version to 1.0.1-SNAPSHOT
b77aeb6 (tag: release/1.0.0) set release version to 1.0.0
1e88cf3 add .gitignore for build outputs
662fe1b initial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commandlet ide sub-command devonfw-ide backward compatibility for devonfw-ide (regression) git git version management tool integration QA approved Label a PR that has been re-testet via nightly SNAPSHOT after merge and commented. release related to release commandlet and releases of IDEasy

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

implement ReleaseCommandlet

3 participants