summaryrefslogtreecommitdiff
path: root/build.go
diff options
context:
space:
mode:
Diffstat (limited to 'build.go')
-rw-r--r--build.go26
1 files changed, 6 insertions, 20 deletions
diff --git a/build.go b/build.go
index 5b3abf2..ccb32a5 100644
--- a/build.go
+++ b/build.go
@@ -44,28 +44,11 @@ func (f *Forge) doBuild(repo *gitpb.Repo, userFlags []string, goWhat string) err
defer os.Unsetenv("GO111MODULE")
}
- // get the version
- version := repo.GetCurrentBranchVersion()
-
- /*
- all := repo.Tags.SortByRefname()
- for all.Scan() {
- t := all.Next()
- log.Info("Build() tag:", t.Refname)
- }
- */
-
- if repo.GoDeps == nil {
- repo.RedoGoMod()
- }
- if repo.GoDeps.Len() == 0 {
- // eh, potentially runs it twice. don't care right now
- log.Info("redo go.mod", repo.GetGoPath())
- repo.RedoGoMod()
- f.Repos.ConfigSave()
+ if err := repo.ValidGoSum(); err != nil {
+ return err
}
- // run autogenpb in all protobuf repos
+ // build the protobuf files in all protobuf repos
all := repo.GoDeps.SortByGoPath()
for all.Scan() {
t := all.Next()
@@ -77,6 +60,9 @@ func (f *Forge) doBuild(repo *gitpb.Repo, userFlags []string, goWhat string) err
}
}
+ // get the version
+ version := repo.GetCurrentBranchVersion()
+
if repo.CheckDirty() {
version = version + "-dirty"
}