Skip to content

Commit

Permalink
Merge pull request #208 from stokado/fix/KTOR-7932
Browse files Browse the repository at this point in the history
* Fix ArrayIndexOutOfBounds exception
* Update README to clarify tool usage

---------

Co-authored-by: Osip Fatkullin <[email protected]>
  • Loading branch information
osipxd authored Dec 11, 2024
2 parents fc3b88b + 445d9f9 commit 2d0b0e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion version-diff/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ A diff tool for maven artifacts written using the [Ktor](https://ktor.io) client
Execute this command in a sample directory:

```bash
./gradlew run --args="1.6.8 2.2.2 <Optional repo url, default https://repo.maven.apache.org/maven2/io/ktor>"
./gradlew run --args="1.6.8 2.2.2"
```

* `1.6.8` and `2.2.2` are the versions of the Maven artifact to compare.
* By default, the repository URL is https://repo.maven.apache.org/maven2/io/ktor.
If you want to use a repository other than the default, provide it explicitly as the third argument:
```bash
./gradlew run --args="2.3.13 3.0.0 https://oss.sonatype.org/content/repositories/releases/io/ktor"
```
2 changes: 1 addition & 1 deletion version-diff/src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fun main(args: Array<String>) = runBlocking {
val firstVersion = args[0]
val secondVersion = args[1]

val repo = if (args.size > 2) args[3] else DEFAULT_REPO
val repo = if (args.size > 2) args[2] else DEFAULT_REPO

println("Fetching diff for $repo $firstVersion -> $secondVersion")

Expand Down

0 comments on commit 2d0b0e5

Please sign in to comment.