File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6363 release :
6464 needs : build
6565 runs-on : ubuntu-latest
66- if : startsWith(github.ref, 'refs/tags/')
66+ if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
6767
6868 steps :
69+ - name : Checkout code
70+ uses : actions/checkout@v4
71+ with :
72+ fetch-depth : 0
73+
6974 - name : Download all artifacts
7075 uses : actions/download-artifact@v4
7176 with :
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import (
3737 "os/exec"
3838 "path/filepath"
3939 "regexp"
40+ "runtime/debug"
4041 "strings"
4142
4243 "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
@@ -45,8 +46,18 @@ import (
4546 "github.com/spf13/cobra"
4647)
4748
48- // Version information (set via ldflags at build time)
49- var version = "dev"
49+ // Version information (set via ldflags at build time, or read from build info)
50+ var version = ""
51+
52+ func init () {
53+ if version == "" {
54+ if info , ok := debug .ReadBuildInfo (); ok && info .Main .Version != "" {
55+ version = info .Main .Version
56+ } else {
57+ version = "dev"
58+ }
59+ }
60+ }
5061
5162var defaultAllowedDomains = []string {"visualstudio.com" , "dev.azure.com" }
5263
You can’t perform that action at this time.
0 commit comments