chore: add github workflow to build nfctl

This commit is contained in:
loveuer
2024-07-13 21:56:47 +08:00
parent b267cc7a2e
commit cbb959a31e
3 changed files with 71 additions and 4 deletions

View File

@ -18,6 +18,9 @@ func main() {
_ = cmd.Root.ExecuteContext(ctx)
// 延迟以便 check 检查
time.Sleep(1500 * time.Millisecond)
select {
case <-time.After(3 * time.Second):
case <-ctx.Done():
case <-version.OkCh:
}
}

View File

@ -11,7 +11,7 @@ import (
"sync"
)
const Version = "v24.07.12-r2"
const Version = "v24.07.13-r1"
var (
lk = &sync.Mutex{}
@ -25,7 +25,8 @@ var (
fmt.Println()
}
}
Fn = empty
Fn = empty
OkCh = make(chan struct{}, 1)
)
func Check() {
@ -57,6 +58,7 @@ func Check() {
lk.Lock()
Fn = upgrade(v)
lk.Unlock()
OkCh <- struct{}{}
return
}
}