summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/main.go b/main.go
index 9a7bf55..208b83c 100644
--- a/main.go
+++ b/main.go
@@ -29,6 +29,18 @@ func main() {
me.forge = forgepb.Init()
me.found = new(gitpb.Repos)
+ all := me.forge.Repos.SortByFullPath()
+ for all.Scan() {
+ repo := all.Next()
+ if repo.IsMasterBranch() {
+ continue
+ }
+ log.Info("not on master branch:", repo.GetCurrentBranchName(), repo.GetMasterBranchName())
+ log.Info("not on master branch:", repo.GetFullPath())
+ log.Info("you can not continue if repos are not on master branches")
+ os.Exit(-1)
+ }
+
// me.forge.ConfigPrintTable()
os.Setenv("REPO_WORK_PATH", me.forge.GetGoSrc())