diff --git a/version-diff/README.md b/version-diff/README.md index e13b9d43..12be45cd 100644 --- a/version-diff/README.md +++ b/version-diff/README.md @@ -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 " +./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" +``` \ No newline at end of file diff --git a/version-diff/src/main/kotlin/Main.kt b/version-diff/src/main/kotlin/Main.kt index 328499ff..e821dba6 100644 --- a/version-diff/src/main/kotlin/Main.kt +++ b/version-diff/src/main/kotlin/Main.kt @@ -18,7 +18,7 @@ fun main(args: Array) = 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")