-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feature inquiry: optionally exit with non-zero exit code if any deps are outdated #39
Comments
Oh this is a really nice idea, I don't have a need for it personally but I'm okay with the concept. I had a think about the arg and I think I agree with I don't think it'd be too complex to implement, presumably a |
Great!
Great.
Aha, that’s very helpful! Yeah, that looks right. I’ll get right on it. Thanks! |
I’ve got this “code complete” locally but I haven’t had a chance to test it yet. Hopefully next week — I’m very distracted right now as my daughter (7) is quarantined at home due to COVID-19. |
Well done, I'll take a look at it soon and see if I have any feedback too. I'm sure it's good 😄 I was snowboarding over the past week but I'm isolating now too. You focus on your family, that's far more important, we'll get this sorted whenever, no rush. I hope your daughter and the rest of your family are completely okay! |
Thanks! We are okay, thanks. 🤗 |
Hey, any new on this issue? Would really appreciate this. |
I want this feature as well. Non-zero exit status seems to be somewhat standard for similar tools ( @aviflax @Olical: is someone working on this still? What is missing? Does it need automated tests? I noticed the fork repository is archived. I noticed this line in b98e1fe :
This is probably a bad idea. Different exit codes denote different things, and especially high ones have standard uses. It's better to just exit with 1 always when there are updates, and document that under exit codes. |
Agreed with the exit code part, and no, I don't think anyone is working on this right now. I'm actually erring on finally giving this repository the makeover it kind of sorely needs. I accepted PRs that were good but not how I would've done them, and as a result I feel a little alienated from the codebase so I'm hesitant to try and make any changes. I've been kind of mentally overloaded until pretty recently so I'm going to be getting my OSS gears spinning again, I have a LOT I want to do on Conjure but a rewrite of Depot could be pretty welcome since it doesn't look like anyone else has tackled this problem since I did? Food for thought, a future version that has the following properties:
Basically the goal would be to make it so simple and targeted towards a goal that it's hard to get it wrong. Yes I'd be removing bells and whistles, but I don't understand those bells and whistles right now so I'd rather leave them in a stale version since I don't know how to improve / work on them anyway. Thoughts? |
I'm not aware of better tools for this task. I personally use Depot with What would the command to get equal functionality to |
I'm not sure yet, I need to give this some long slow thought really to see if I can find a way to do both. I think updating everything is a little scary in a lot of cases. I just don't want to be processing the EDN anymore, I think it's too hard to do consistently with tools.deps, I'd rather lean on tools.deps for as much as possible. Maybe I can think of a way to use tools.deps but do a little EDN digging to find all alias names as well as work out how to put the changes back in the right places. I think it'll be really hard to do, but I'll give it some time with the slow brain. |
Here is a workaround for getting the exit value 1 when old versions are found: clj -A:outdated |awk -v ret=0 '/^ /{ret=1;} /^/{print} END {exit ret}' |
Correction, the above did not account for the "All up to date!" being indented by two as well:
Should match the following:
|
@Olical any update on getting that exit code feature in depot? Could someone help by creating a PR? Any tips? |
Didn't mean to close that, I just pushed a change that adds a |
@Olical tested by cloning and running
|
Published under v2.2.0! |
I’d like to set up a nightly CI job that would run depot and would fail if any deps are out of date. The CI service I use will automatically fail a step if a command exits with a non-zero exit code, so I’d love to be able to invoke Depot with a new option that would cause it to exit if any deps are found to be out of date.
Something like:
clojure -A:outdated --fail
I’d be happy to try to contribute this feature via a PR (assuming I can find the time) but I thought I’d run it by the project maintainers first to check if there’s be interest in accepting such a contribution.
Thanks!
The text was updated successfully, but these errors were encountered: