1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-06 03:13:48 +02:00

gometalinter on ci and some fixes

This commit is contained in:
Carlos Alexandro Becker 2017-01-02 10:45:05 -02:00
parent b542f5e05a
commit 57edf81057
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
3 changed files with 12 additions and 6 deletions

View File

@ -1,11 +1,18 @@
language: go
go: 1.7.4
install:
- go get github.com/alecthomas/gometalinter
- go get github.com/Masterminds/glide
- glide install
script:
- go test -cover `glide nv`
- gometalinter --vendor --disable-all \
--enable=deadcode \
--enable=ineffassign \
--enable=gosimple \
--enable=staticcheck \
./...
after_success:
test ! -z "$TRAVIS_TAG" && go run main.go
notifications:
email: false
email: false

View File

@ -54,7 +54,9 @@ func Load(file string) (config ProjectConfig, err error) {
if err != nil {
return config, err
}
err = yaml.Unmarshal(data, &config)
if err := yaml.Unmarshal(data, &config); err != nil {
return config, err
}
config.fillBasicData()
if err := config.fillFiles(); err != nil {
return config, err

View File

@ -51,10 +51,7 @@ func create(system, arch string, config config.ProjectConfig) error {
return err
}
}
if err := addFile(tw, config.BinaryName+ext(system), binaryPath(system, arch, config.BinaryName)); err != nil {
return err
}
return nil
return addFile(tw, config.BinaryName+ext(system), binaryPath(system, arch, config.BinaryName))
}
func addFile(tw *tar.Writer, name, path string) error {