This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1297 from weaveworks/issue/1267-multiple-paths
Support multiple `-git-path` arguments
- Loading branch information
Showing
19 changed files
with
114 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,7 +79,7 @@ func main() { | |
// Git repo & key etc. | ||
gitURL = fs.String("git-url", "", "URL of git repo with Kubernetes manifests; e.g., [email protected]:weaveworks/flux-example") | ||
gitBranch = fs.String("git-branch", "master", "branch of git repo to use for Kubernetes manifests") | ||
gitPath = fs.String("git-path", "", "path within git repo to locate Kubernetes manifests (relative path)") | ||
gitPath = fs.StringSlice("git-path", []string{}, "relative paths within the git repo to locate Kubernetes manifests") | ||
gitUser = fs.String("git-user", "Weave Flux", "username to use as git committer") | ||
gitEmail = fs.String("git-email", "[email protected]", "email to use as git committer") | ||
gitSetAuthor = fs.Bool("git-set-author", false, "If set, the author of git commits will reflect the user who initiated the commit and will differ from the git committer.") | ||
|
@@ -161,9 +161,11 @@ func main() { | |
*gitSkipMessage = defaultGitSkipMessage | ||
} | ||
|
||
if len(*gitPath) > 0 && (*gitPath)[0] == '/' { | ||
logger.Log("err", "git subdirectory (--git-path) should not have leading forward slash") | ||
os.Exit(1) | ||
for _, path := range *gitPath { | ||
if len(path) > 0 && path[0] == '/' { | ||
logger.Log("err", "subdirectory given as --git-path should not have leading forward slash") | ||
os.Exit(1) | ||
} | ||
} | ||
|
||
if *sshKeygenDir == "" { | ||
|
@@ -353,7 +355,7 @@ func main() { | |
|
||
gitRemote := git.Remote{URL: *gitURL} | ||
gitConfig := git.Config{ | ||
Path: *gitPath, | ||
Paths: *gitPath, | ||
Branch: *gitBranch, | ||
SyncTag: *gitSyncTag, | ||
NotesRef: *gitNotesRef, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.