mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-04-11 11:42:15 +02:00
feat: Add persist definition to scoop manifest (#776)
This commit is contained in:
parent
6217d1e90d
commit
da882e87fc
@ -101,6 +101,7 @@ type Manifest struct {
|
||||
Homepage string `json:"homepage,omitempty"` // `homepage`: The home page for the program.
|
||||
License string `json:"license,omitempty"` // `license`: The software license for the program. For well-known licenses, this will be a string like "MIT" or "GPL2". For custom licenses, this should be the URL of the license.
|
||||
Description string `json:"description,omitempty"` // Description of the app
|
||||
Persist []string `json:"persist,omitempty"` // Persist data between updates
|
||||
}
|
||||
|
||||
// Resource represents a combination of a url and a binary name for an architecture
|
||||
@ -117,6 +118,7 @@ func buildManifest(ctx *context.Context, artifacts []artifact.Artifact) (bytes.B
|
||||
Homepage: ctx.Config.Scoop.Homepage,
|
||||
License: ctx.Config.Scoop.License,
|
||||
Description: ctx.Config.Scoop.Description,
|
||||
Persist: ctx.Config.Scoop.Persist,
|
||||
}
|
||||
|
||||
for _, artifact := range artifacts {
|
||||
|
@ -410,6 +410,7 @@ func Test_buildManifest(t *testing.T) {
|
||||
},
|
||||
Description: "A run pipe test formula",
|
||||
Homepage: "https://github.com/goreleaser",
|
||||
Persist: []string{"data", "config", "test.ini"},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -448,6 +449,7 @@ func Test_buildManifest(t *testing.T) {
|
||||
Description: "A run pipe test formula",
|
||||
Homepage: "https://github.com/goreleaser",
|
||||
URLTemplate: "http://github.mycompany.com/foo/bar/{{ .Tag }}/{{ .ArtifactName }}",
|
||||
Persist: []string{"data.cfg", "etc"},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -11,5 +11,10 @@
|
||||
}
|
||||
},
|
||||
"homepage": "https://github.com/goreleaser",
|
||||
"description": "A run pipe test formula"
|
||||
"description": "A run pipe test formula",
|
||||
"persist": [
|
||||
"data",
|
||||
"config",
|
||||
"test.ini"
|
||||
]
|
||||
}
|
@ -11,5 +11,9 @@
|
||||
}
|
||||
},
|
||||
"homepage": "https://github.com/goreleaser",
|
||||
"description": "A run pipe test formula"
|
||||
"description": "A run pipe test formula",
|
||||
"persist": [
|
||||
"data.cfg",
|
||||
"etc"
|
||||
]
|
||||
}
|
@ -61,6 +61,7 @@ type Scoop struct {
|
||||
Description string `yaml:",omitempty"`
|
||||
License string `yaml:",omitempty"`
|
||||
URLTemplate string `yaml:"url_template,omitempty"`
|
||||
Persist []string `yaml:"persist,omitempty"`
|
||||
}
|
||||
|
||||
// CommitAuthor is the author of a Git commit
|
||||
|
@ -40,6 +40,11 @@ scoop:
|
||||
# Your app's license
|
||||
# Default is empty.
|
||||
license: MIT
|
||||
|
||||
# Persist data between application updates
|
||||
persist:
|
||||
- "data"
|
||||
- "config.toml"
|
||||
```
|
||||
|
||||
By defining the `scoop` section, GoReleaser will take care of publishing the
|
||||
|
Loading…
x
Reference in New Issue
Block a user