-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
push tag even if no changes are detected in Multi-repo project #262
Comments
Would you mind showing the example directory structure, highlighting modules and how you configure axion in Technically axion is now ready to handle such situations (multiple tags on single commit) when resolving versions but i would like to understand how it behaves when you create release. |
I'm using a directory structure with a global configuration following the documentation examples. Axion almost worked for this use case but it did require some small changes. The changes enable the user to pass command line flags to skip certain Axion verification steps. This allows tagging to proceed when a) module is on HEAD and when b) there is no snapshot detected (those conditions would normally cause the release to fail). With those cases handled I am able to run a release in the root module regardless of changes to modules... ie-- permits the user to run a release on each module even if there are no committed changes. Example with the flags added (see patch file below):
I also needed to release all modules with the same version string. There wasn't an obvious way to accomplish this so I coded two allprojects loops in build.gradle; the first loop to examine all modules and collect the highest version found and the second loop to set each module version to the value we found. build.gradle
Example before code changes: moduleA => v1.1.0 Example after code changes are committed to B: moduleA => v1.1.0 Example after release: moduleA => v1.1.1 Here is a dirty patch file with the changes to meet this use case. I think this "single release version" feature is valuable for tagging large multi-module frameworks. With the small patch attached I was able to use Axion for this process. patch-axion-support-multirepo-release.txt Also... excuse me for the delayed response and thanks for the feedback! |
I think I'm missing something to understand what you want to achieve. What I don't understand is why do you need separate versions per module. Maybe you can have single version for the project? To better illustrate what I mean and how I see your project based on info you gave:
Since you keep versions in sync on every release, the structure looks probably bit more like:
Or in case of some next-version manoeuvres:
What you want to get after release is:
So why have separate versioning per module? Why not keep it simple and have one version for all?
|
Sorry, let me correct the example layout. For my case there is a root project module which contains multiple submodules. For most releases the root project module does not need to change.
We considered a workaround similar to your suggestion... when we wanted to release, we could commit a change to myRootProject and apply that version to all subprojects. However this process wasn't attractive because it would require unnecessary commits to myRootProject (or Axion would abort the release task). The goal is to increment version in an automated way if either root project or submodules have changes ready to release. I couldn't make that work without the patch changes above. EDIT: This isn't an active issue, closing it now. |
I'm attempting to release using a multi-module project but I notice the default behavior prevents "re-tagging" a release. We're using a "release train" where upon release all modules are given the same version number. This means some modules which rarely (or never) change should still be tagged with each new release. Example: current version is 1.0.0, new code is committed to a module, when ready to release then all modules need to be tagged to 1.0.1 regardless if there are any code changes in each module repository. Default behavior gives a warning message "nothing to release".
logger.quiet("Working on released version ${version}, nothing to release")
Does this "force release" functionality already exist? I tested a small code change in the Axion plugin to make this work but I am wondering if there is a cleaner way to do this.
Thanks,
Neil
The text was updated successfully, but these errors were encountered: