diff --git a/.github/workflows/go-releaser.yml b/.github/workflows/go-releaser.yml index 0e2d4699..a519a56e 100644 --- a/.github/workflows/go-releaser.yml +++ b/.github/workflows/go-releaser.yml @@ -28,7 +28,7 @@ jobs: with: distribution: goreleaser version: latest - args: release --clean ${{ env.flags }} + args: release --clean --release-notes ${{ env.flags }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COSIGN_PWD: ${{ secrets.COSIGN_PWD }} diff --git a/cmd/main.go b/cmd/main.go index dd078758..67e3d5f6 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -17,17 +17,18 @@ package main import ( - "github.com/pterm/pterm" "os" "os/signal" "strings" "syscall" + "github.com/pterm/pterm" + "github.com/urfave/cli/v2" "github.com/version-fox/vfox/sdk" ) -const Version = "0.1.0" +const Version = "0.1.1" func main() { cli.VersionFlag = &cli.BoolFlag{ diff --git a/sdk/sdk.go b/sdk/sdk.go index 93cff337..76c7eed5 100644 --- a/sdk/sdk.go +++ b/sdk/sdk.go @@ -265,7 +265,7 @@ func (b *Sdk) getLocalSdkPackage(version Version) (*Package, error) { } for _, d := range dir { if d.IsDir() { - split := strings.Split(d.Name(), "-") + split := strings.SplitN(d.Name(), "-", 2) if len(split) != 2 { continue } @@ -285,6 +285,11 @@ func (b *Sdk) getLocalSdkPackage(version Version) (*Package, error) { if err != nil { return nil, err } + + if mainSdk.Path == "" { + return nil, errors.New("main sdk not found") + + } return &Package{ Main: mainSdk, Additional: additional,