All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lunatech.cmt.admin.cli.SharedOptions.scala Maven / Gradle / Ivy

There is a newer version: 2.0.19
Show newest version
package com.lunatech.cmt.admin.cli

import caseapp.{ExtraName, Help, HelpMessage, Parser, ValueDescription}
import com.lunatech.cmt.admin.Domain.{ConfigurationFile, MainRepository}
import com.lunatech.cmt.admin.cli.ArgParsers.{configurationFileArgParser, mainRepositoryArgParser}

final case class SharedOptions(
    @ExtraName("m")
    @ValueDescription("The repository directory in/on which the command will operate")
    @HelpMessage("The path supplied must be a directory located within a git repository")
    mainRepository: MainRepository,
    @ExtraName("c")
    @ValueDescription("The (optional) configuration file to use during processing of the command")
    @HelpMessage(
      "if not specified will default to the config file present in the directory provided by the --main-repository argument")
    maybeConfigFile: Option[ConfigurationFile] = None)

object SharedOptions {
  given parser: Parser[SharedOptions] = Parser.derive
  given help: Help[SharedOptions] = Help.derive
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy