-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add forced focus option #262
Conversation
@Kaspazza Thanks for your contribution!
Make sence! I'll have a look :) |
Thanks for the review @liquidz, I've applied your suggestions. |
@Kaspazza Thanks! I'll have a look this weekend :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kaspazza Overall, looks good!
Could you fix few minor revisions at the end?
@liquidz Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kaspazza Thank you so much!
@Kaspazza Just released v2.10.1241 :) |
Hi, it's me again.
We've been using previously programmatic API, but due to compatibility issues with Babashka, we've moved to CLI.
Currently, there is no option in CLI to force a specific version of the dependency to update.
Our use case to be more specific, is that we want to update to the non-existing yet version as we are deploying multiple co-dependent apps together. Which was possible in API by just supplying deps and target version we want it to update.
The CLI focus option seems best for me for that feature, as we want to focus on that dependency and update it to a specific version.
In terms of syntax, exclude follows a similar syntax of being able to exclude dep completely or specific version, currently focus was not leveraging the version option, so I've added this behavior under that versioning syntax.
--focus=artifact[@VERSION]
The feature was implemented in a manner that should not affect any existing behaviors that user may call. This is completely separate new feature.
Previously calling focus with
[@VERSION]
will result in empty deps to update, as it was considering whole string as a dependency name. Now if@
appears, it considers it as forced-focus feature, otherwise as it was previously.Example usage is described in .md and tests.
I use it like that:
Let's assume current version of artifact
org.clojars.hephaistox/automaton-build
in clojars is 3.1.0I run
clojure -M:antq --upgrade --force --focus=org.clojars.hephaistox/[email protected]
And in my deps.edn, I expect all references to org.clojars.hephaistox/automaton-build to be updated to 3.2.0
So whatever is set after @ in focus options is treated as source of truth for new version setting.