using StringSlice instead of []string for Files

This commit is contained in:
jackspirou 2016-01-15 16:02:12 -06:00
parent fcfb446e4c
commit d4f663cf8f
3 changed files with 4 additions and 4 deletions

View File

@ -13,8 +13,7 @@ Sample configuration:
publish: publish:
github_release: github_release:
api_key: my_github_api_key api_key: my_github_api_key
files: files: dist/*
- dist/*
checksum: sha1 checksum: sha1
``` ```
@ -26,6 +25,7 @@ publish:
api_key: my_github_api_key api_key: my_github_api_key
files: files:
- dist/* - dist/*
- bin/binary.exe
checksum: checksum:
- md5 - md5
- sha1 - sha1

View File

@ -60,7 +60,7 @@ func main() {
} }
var files []string var files []string
for _, glob := range vargs.Files { for _, glob := range vargs.Files.Slice() {
globed, err := filepath.Glob(glob) globed, err := filepath.Glob(glob)
if err != nil { if err != nil {
fmt.Printf("Failed to glob %s\n", glob) fmt.Printf("Failed to glob %s\n", glob)

View File

@ -7,6 +7,6 @@ type Params struct {
BaseURL string `json:"base_url"` BaseURL string `json:"base_url"`
UploadURL string `json:"upload_url"` UploadURL string `json:"upload_url"`
APIKey string `json:"api_key"` APIKey string `json:"api_key"`
Files []string `json:"files"` Files drone.StringSlice `json:"files"`
Checksum drone.StringSlice `json:"checksum"` Checksum drone.StringSlice `json:"checksum"`
} }