Use Different Remote Repos (#58)

This commit is contained in:
6543
2019-10-26 21:29:37 +00:00
committed by lafriks
parent cd1ddb86b5
commit 0515114fa3
3 changed files with 35 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ var (
loginValue string
repoValue string
outputValue string
remoteValue string
)
// LoginFlag provides flag to specify tea login profile
@@ -32,6 +33,13 @@ var RepoFlag = cli.StringFlag{
Destination: &repoValue,
}
// RemoteFlag provides flag to specify remote repository
var RemoteFlag = cli.StringFlag{
Name: "remote, R",
Usage: "Set a specific remote repository, is optional if not set use git default one",
Destination: &remoteValue,
}
// OutputFlag provides flag to specify output type
var OutputFlag = cli.StringFlag{
Name: "output, o",
@@ -63,6 +71,7 @@ var LoginRepoFlags = []cli.Flag{
// https://github.com/urfave/cli/issues/585
var AllDefaultFlags = append([]cli.Flag{
RepoFlag,
RemoteFlag,
}, LoginOutputFlags...)
// initCommand returns repository and *Login based on flags