Skip to content

Commit

Permalink
feat: scoop shortcuts (#3846)
Browse files Browse the repository at this point in the history
close: #3845
  • Loading branch information
howieyuen committed Mar 20, 2023
1 parent 98bb4ba commit 1f56d8e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/pipe/scoop/scoop.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ type Manifest struct {
PreInstall []string `json:"pre_install,omitempty"` // An array of strings, of the commands to be executed before an application is installed.
PostInstall []string `json:"post_install,omitempty"` // An array of strings, of the commands to be executed after an application is installed.
Depends []string `json:"depends,omitempty"` // A string or an array of strings.
Shortcuts [][]string `json:"shortcuts,omitempty"` // A two-dimensional array of string, specifies the shortcut values to make available in the startmenu.
}

// Resource represents a combination of a url and a binary name for an architecture.
Expand Down Expand Up @@ -225,6 +226,7 @@ func dataFor(ctx *context.Context, cl client.Client, artifacts []*artifact.Artif
PreInstall: ctx.Config.Scoop.PreInstall,
PostInstall: ctx.Config.Scoop.PostInstall,
Depends: ctx.Config.Scoop.Depends,
Shortcuts: ctx.Config.Scoop.Shortcuts,
}

if ctx.Config.Scoop.URLTemplate == "" {
Expand Down
1 change: 1 addition & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ type Scoop struct {
PreInstall []string `yaml:"pre_install,omitempty" json:"pre_install,omitempty"`
PostInstall []string `yaml:"post_install,omitempty" json:"post_install,omitempty"`
Depends []string `yaml:"depends,omitempty" json:"depends,omitempty"`
Shortcuts [][]string `yaml:"shortcuts,omitempty" json:"shortcuts,omitempty"`
Goamd64 string `yaml:"goamd64,omitempty" json:"goamd64,omitempty"`
}

Expand Down
7 changes: 7 additions & 0 deletions www/docs/customization/scoop.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ scoop:
# Since GoReleaser v1.16.0.
depends: ["git", "foo"]


# A two-dimensional array of string, specifies the shortcut values to make available in the startmenu.
# The array has to contain a executable/label pair. The third and fourth element are optional.
# Defaults to empty.
# Since GoReleaser v1.17.0.
shortcuts: [["drumroll.exe", "drumroll"]]

# GOAMD64 to specify which amd64 version to use if there are multiple versions
# from the build section.
# Default is v1.
Expand Down
7 changes: 7 additions & 0 deletions www/docs/static/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f56d8e

Please sign in to comment.