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 {
22
22
Action : func (ctx context.Context , command * cli.Command ) error {
23
23
defer recovery .Exit ()
24
24
25
- utils .GitFetchAll ()
26
-
25
+ var done = make (chan struct {})
26
+ go func () {
27
+ defer close (done )
28
+ utils .GitFetchAll ()
29
+ }()
30
+
27
31
var p = tea .NewProgram (initialModel ())
28
32
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 {
32
43
ver = utils .GetNextReleaseTag (tags )
33
44
}
34
45
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import (
18
18
"github.com/samber/lo"
19
19
)
20
20
21
- func GetGitTags () []* semver.Version {
21
+ func GetAllGitTags () []* semver.Version {
22
22
var tagText = strings .TrimSpace (assert .Exit1 (RunOutput ("git" , "tag" )))
23
23
var tags = strings .Split (tagText , "\n " )
24
24
var versions = make ([]* semver.Version , 0 , len (tags ))
You can’t perform that action at this time.
0 commit comments