From 19b1dee93339d8886b47193d2db0a497a20533eb Mon Sep 17 00:00:00 2001 From: Gleb Nazarov Date: Wed, 11 Dec 2024 18:42:21 +0500 Subject: [PATCH 1/5] fix ArrayIndexOutOfBounds exception --- version-diff/src/main/kotlin/Main.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") From 27d4d4d220dc649aff25b076ae681cfb443b71c3 Mon Sep 17 00:00:00 2001 From: Gleb Nazarov Date: Wed, 11 Dec 2024 18:43:02 +0500 Subject: [PATCH 2/5] update README to clarify tool usage --- version-diff/README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/version-diff/README.md b/version-diff/README.md index e13b9d43..32f4c707 100644 --- a/version-diff/README.md +++ b/version-diff/README.md @@ -7,5 +7,18 @@ 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" ``` + +### Explanation + +* 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. + +### Customizing the Repository URL + +If you want to use a repository other than the default, provide it explicitly as the third argument: + +```bash +./gradlew run --args="6.2.0 5.0.0 https://repo.maven.apache.org/maven2/org/springframework" +``` \ No newline at end of file From 54a8871eeabfcfb92da64a1964be0c7d8e9f1cc5 Mon Sep 17 00:00:00 2001 From: Gleb Nazarov Date: Wed, 11 Dec 2024 20:30:25 +0500 Subject: [PATCH 3/5] remove some of the blank lines Co-authored-by: Osip Fatkullin --- version-diff/README.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/version-diff/README.md b/version-diff/README.md index 32f4c707..311a9a5f 100644 --- a/version-diff/README.md +++ b/version-diff/README.md @@ -10,15 +10,9 @@ Execute this command in a sample directory: ./gradlew run --args="1.6.8 2.2.2" ``` -### Explanation - -* 1.6.8 and 2.2.2 are the versions of the Maven artifact to compare. +* `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. - -### Customizing the Repository URL - -If you want to use a repository other than the default, provide it explicitly as the third argument: - -```bash + If you want to use a repository other than the default, provide it explicitly as the third argument: + ```bash ./gradlew run --args="6.2.0 5.0.0 https://repo.maven.apache.org/maven2/org/springframework" ``` \ No newline at end of file From 383dc47fd78063274ec6fa41f6791a774d4eb5c2 Mon Sep 17 00:00:00 2001 From: Gleb Nazarov Date: Wed, 11 Dec 2024 20:31:12 +0500 Subject: [PATCH 4/5] replace example repository Co-authored-by: Osip Fatkullin --- version-diff/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version-diff/README.md b/version-diff/README.md index 311a9a5f..d3ad2756 100644 --- a/version-diff/README.md +++ b/version-diff/README.md @@ -14,5 +14,5 @@ Execute this command in a sample directory: * 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="6.2.0 5.0.0 https://repo.maven.apache.org/maven2/org/springframework" +./gradlew run --args="2.3.13 3.0.0 https://oss.sonatype.org/content/repositories/releases/io/ktor" ``` \ No newline at end of file From 445d9f998d4d3e9d9a3577b117db2dcd02a58776 Mon Sep 17 00:00:00 2001 From: Gleb Nazarov Date: Wed, 11 Dec 2024 20:33:30 +0500 Subject: [PATCH 5/5] fix README after applied suggestion --- version-diff/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version-diff/README.md b/version-diff/README.md index d3ad2756..12be45cd 100644 --- a/version-diff/README.md +++ b/version-diff/README.md @@ -13,6 +13,6 @@ Execute this command in a sample directory: * `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 +```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