Skip to content
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 Docker instructions and syntax highlighting tips #305

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hubertgrzeskowiak
Copy link

Just adding some useful stuff to the README that took me a while to figure out

@@ -47,6 +47,11 @@ danger(args) {

### Setup

### Docker
```sh
docker run --rm -v "${PWD}:/code" -w /code ghcr.io/danger/danger-kotlin:1.3.3 danger-kotlin local
Copy link
Author

Choose a reason for hiding this comment

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

This would theoretically also work without changing the work directory, but the default dir is the root, so mounting the current working directory there could override existing files. Mounting it in a new dir and using that for running the command seems much safer.

@@ -130,6 +135,9 @@ You can activate the autocomplete following this additional steps:
- Make sure the script template `DangerFileScript` is active and above the default `Kotlin Script`
- Apply changes
- If opening the `Dangerfile.df.kts` the autocomplete and syntax highlighting doesn't work, try to reboot your IDE or open the Dangerfile from your IDE as a single file.
- If it still doesn't work, go to `Help -> Edit Custom VM Options...` and add `-Dkotlin.script.classpath=<path>/danger-kotlin.jar` (replace the `<path>` with the absolute path to the JAR). Then restart the IDE.
Copy link
Author

Choose a reason for hiding this comment

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

I actually ran this tool without installing. I got the JAR from the Docker image using

docker run --rm ghcr.io/danger/danger-kotlin:1.3.3 gzip --stdout /usr/local/lib/danger/danger-kotlin.jar | gunzip > danger-kotlin.jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant