Skip to content

Commit

Permalink
Merge 3a0e160 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 22, 2022
2 parents 15d75cd + 3a0e160 commit 87d60b3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ publishing {
}
scm {
url.set(github)
connection.set(
github.replace("https:", "scm:git:") + ".git")
connection.set(github.replace("https:", "scm:git:"))
}
licenses {
license {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "io.github.rtmigo"
version = "0.4.1" // -SNAPSHOTjar
version = "0.4.2" // -SNAPSHOT

repositories {
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/Build.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// DO NOT EDIT. Generated by Gradle task "generateBuildKt"
object Build {
const val version = "0.4.0"
const val date = "2022-10-21"
const val version = "0.4.1"
const val date = "2022-10-22"
}
3 changes: 2 additions & 1 deletion src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import stages.upload.*
import tools.rethrowingState
import java.nio.file.*
import kotlin.io.path.absolute
import kotlin.system.exitProcess


class Cli : NoOpCliktCommand(
Expand Down Expand Up @@ -126,8 +127,8 @@ fun catchingCommand(cmd: CliktCommand, block: suspend () -> Unit) {
else
System.err.println("ERROR: $e")
System.err.println("Run with --trace to see full stack trace.")
exitProcess(1)
}

}

fun main(args: Array<String>) {
Expand Down
12 changes: 6 additions & 6 deletions src/main/kotlin/stages/upload/Http.kt
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ private data class StagingRepoCreatedResponse(val repositoryUris: List<String>)


fun humanReadableByteCountSI(bytes: Long): String {
var bytes = bytes
if (-1000 < bytes && bytes < 1000) {
return "$bytes B"
var bytesVar = bytes
if (-1000 < bytesVar && bytesVar < 1000) {
return "$bytesVar B"
}
val ci: CharacterIterator = StringCharacterIterator("kMGTPE")
while (bytes <= -999950 || bytes >= 999950) {
bytes /= 1000
while (bytesVar <= -999950 || bytesVar >= 999950) {
bytesVar /= 1000
ci.next()
}
return String.format("%.1f %cB", bytes / 1000.0, ci.current())
return String.format("%.1f %cB", bytesVar / 1000.0, ci.current())
}

suspend fun HttpClient.sendToStaging(file: Path, notation: Notation): StagingUri {
Expand Down

0 comments on commit 87d60b3

Please sign in to comment.