Skip to content

Commit

Permalink
Refactor camelCase to kebab-case in cli runner (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamildoleglo authored Jan 20, 2023
1 parent 1a3b6e4 commit 3190fd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/src/main/kotlin/org/virtuslab/bazelsteward/app/Context.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ data class Context(
fun fromArgs(args: Array<String>, env: Environment): Context {
val parser = ArgParser("bazel-steward")
val repository by parser.argument(ArgType.String, description = "Location of the local repository to scan")
.optional()
.optional().default(".")
val github by parser.option(ArgType.Boolean, description = "Run as a github action").default(false)
val pushToRemote by parser.option(ArgType.Boolean, description = "Push to remote", shortName = "p").default(false)
val pushToRemote by parser.option(ArgType.Boolean, fullName = "push-to-remote", description = "Push to remote", shortName = "p").default(false)
parser.parse(args)

val repoPath = if (github) GithubClient.getRepoPath(env) else Path(repository ?: ".")
val repoPath = if (github) GithubClient.getRepoPath(env) else Path(repository)
val baseBranch = runBlocking {
GitClient(repoPath.toFile()).runGitCommand("rev-parse --abbrev-ref HEAD".split(' ')).trim()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MavenE2ETest : E2EBase() {
fun `Maven trivial local test`(@TempDir tempDir: File) {
val testResourcePath = "maven/trivial"
val file = loadTest(tempDir, testResourcePath)
Main.main(args = arrayOf(file.toString(), "--pushToRemote"))
Main.main(args = arrayOf(file.toString(), "--push-to-remote"))
val expectedBranches = listOf("arrow-core", "arrow-fx-coroutines").map { "$branchRef/$it/1.1.5" } + masterRef
checkBranchesWithVersions(tempDir, testResourcePath, expectedBranches)
}
Expand All @@ -20,7 +20,7 @@ class MavenE2ETest : E2EBase() {
fun `Check dependency update not in maven central repository`(@TempDir tempDir: File) {
val testResourcePath = "maven/external"
val file = loadTest(tempDir, testResourcePath)
Main.main(args = arrayOf(file.toString(), "--pushToRemote"))
Main.main(args = arrayOf(file.toString(), "--push-to-remote"))
val expectedBranches = listOf("$branchRef/utilis", masterRef)
checkBranchesWithoutVersions(tempDir, testResourcePath, expectedBranches)
}
Expand Down

0 comments on commit 3190fd5

Please sign in to comment.