Skip to content

Commit

Permalink
Fix host, add --version
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Jul 8, 2024
1 parent d4627e9 commit 2cdb4fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions librarian-cli/librarian.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version.packageName=com.gradleup.librarian.cli
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@ package com.gradleup.librarian.cli

import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.subcommands
import com.github.ajalt.clikt.parameters.options.flag
import com.github.ajalt.clikt.parameters.options.option
import kotlin.system.exitProcess

internal class MainCommand: CliktCommand(invokeWithoutSubcommand = true) {
val version by option().flag()

internal class MainCommand: CliktCommand() {
init {
subcommands(PrepareReleaseCommand(), CreateCommand(), ReleaseCommand(), SetupGithubCommand(), InitCommand())
}
override fun run() {

override fun run() {
if (version) {
println("librarian $VERSION")
exitProcess(1)
}
}
}
2 changes: 1 addition & 1 deletion librarian.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kotlin.compatibility=2.0.0
kdoc.olderVersions=
kdoc.artifactId=kdoc

sonatype.host=S01
sonatype.host=Default

git.snapshots=main

Expand Down

0 comments on commit 2cdb4fa

Please sign in to comment.