-
-
Notifications
You must be signed in to change notification settings - Fork 778
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
Generate the cli as a stand alone executable #2607
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2607 +/- ##
============================================
- Coverage 25.29% 25.28% -0.01%
Complexity 396 396
============================================
Files 379 379
Lines 7437 7438 +1
Branches 1225 1225
============================================
Hits 1881 1881
- Misses 5427 5428 +1
Partials 129 129
Continue to review full report at Codecov.
|
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.
I'm okay with it. Let's wait for Artur's review and for potential 3rd party comments.
Would it be useful to expose the .jar as an artifact of the Github Action run? |
I don't know exctly how the github releases work. Or what "expose the .jar" means exactly. But I think that we should post this executable for each release at github. And expose all the jars of a PR and master/snapshots would be great for the early adaopters. |
Github Actions allows to "attach" one or more artifact for every build. More context here https://github.com/marketplace/actions/upload-artifact |
Isn't this the same thing the Our installation instruction could look like:
|
Oh! i didn't know about that zip. Yeah. This PR do something similar but not the same. That zip contains an "installation": the binaries and the libs. With this we have a stand alone executable. I wanted to merge this to make it easy to add detekt to homebrew. If we have that file I don't care that much about this. But anyway I think that for a user that just want to download detekt and use it the stand-alone executable is more handy. My ultimate idea is to have something like this: How to install detekt:
This PR will help with the "Unix" part. But we don't really need that one if you don't like it. |
group = "Distribution" | ||
|
||
inputs.files(tasks.named("shadowJar")) | ||
outputs.file("$buildDir/run/detekt") |
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.
Please add this path to the githubRelease
part so we upload this immediately in the next release :)
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.
Done. I'll create another PR updating the documentation.
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.
Ah, sorry for the wait. Now I understood what it really does xD
favor to ask - for github releases, the last few have not had consistent naming, which prevents users from reliable downloading. Could you commit to using a standard naming scheme? |
@ZacSweers you mean the |
Fixes #2605
Now if we run
./gradlew shadowJarExecutable
we can execute detekt like this:./detekt-cli/build/run/detek
. So, if we publish this file in each new release, we can help the users how to install/update detekt.Problem: I think that this only work on UNIX. I didn't update the documentation for this reason. I don't know how many people uses windows CMD now a days... ktlint ignores this fact completely as you can check here: https://ktlint.github.io/ should we do it too? Or we can say somthing like:
Unix:
./detekt
Windows:
java -jar detekt
What do you think?