File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,24 @@ func New() *cli.Command {
2222 Action : func (ctx context.Context , command * cli.Command ) error {
2323 defer recovery .Exit ()
2424
25- utils .GitFetchAll ()
26-
25+ var done = make (chan struct {})
26+ go func () {
27+ defer close (done )
28+ utils .GitFetchAll ()
29+ }()
30+
2731 var p = tea .NewProgram (initialModel ())
2832 m := assert .Must1 (p .Run ()).(model )
29- var tags = utils .GetGitTags ()
30- ver := utils .GetNextTag (m .selected , tags )
31- if m .selected == envRelease {
33+ selected := strings .TrimSpace (m .selected )
34+ if selected == "" {
35+ return nil
36+ }
37+
38+ <- done
39+
40+ tags := utils .GetAllGitTags ()
41+ ver := utils .GetNextTag (selected , tags )
42+ if selected == envRelease {
3243 ver = utils .GetNextReleaseTag (tags )
3344 }
3445
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import (
1818 "github.com/samber/lo"
1919)
2020
21- func GetGitTags () []* semver.Version {
21+ func GetAllGitTags () []* semver.Version {
2222 var tagText = strings .TrimSpace (assert .Exit1 (RunOutput ("git" , "tag" )))
2323 var tags = strings .Split (tagText , "\n " )
2424 var versions = make ([]* semver.Version , 0 , len (tags ))
You can’t perform that action at this time.
0 commit comments