diff --git a/.travis.yml b/.travis.yml index c2c229d89..7e2dca16a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,9 @@ install: - gem install fpm script: - make test - - test -n "$TRAVIS_TAG" || go run ./cmd/goreleaser/main.go --skip-validate --skip-publish + - test -n "$TRAVIS_TAG" || go run main.go --skip-validate --skip-publish after_success: - bash <(curl -s https://codecov.io/bash) - - test -n "$TRAVIS_TAG" && go run ./cmd/goreleaser/main.go + - test -n "$TRAVIS_TAG" && go run main.go notifications: email: false diff --git a/Makefile b/Makefile index ecde0aa03..523d745aa 100644 --- a/Makefile +++ b/Makefile @@ -37,11 +37,8 @@ lint: ## Run all the linters ci: lint test ## Run all the tests and code checks -build: ## Build a beta version of releaser - go build -o goreleaser ./cmd/goreleaser/main.go - -install: ## Install the binary into $GOPATH/bin - go install ./cmd/... +build: ## Build a beta version of goreleaser + go build # Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html help: diff --git a/goreleaser.yml b/goreleaser.yml index 9d9eee966..0854c2de8 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -1,7 +1,6 @@ homepage: &homepage http://goreleaser.github.io description: &description Deliver Go binaries as fast and easily as possible build: - main: ./cmd/goreleaser/main.go goos: - linux - darwin diff --git a/goreleaser.go b/goreleaserlib/goreleaser.go similarity index 98% rename from goreleaser.go rename to goreleaserlib/goreleaser.go index 50dbf82d7..0aeeaa18b 100644 --- a/goreleaser.go +++ b/goreleaserlib/goreleaser.go @@ -1,4 +1,4 @@ -package goreleaser +package goreleaserlib import ( "io/ioutil" diff --git a/goreleaser_test.go b/goreleaserlib/goreleaser_test.go similarity index 99% rename from goreleaser_test.go rename to goreleaserlib/goreleaser_test.go index f8063f5ce..34286fa16 100644 --- a/goreleaser_test.go +++ b/goreleaserlib/goreleaser_test.go @@ -1,4 +1,4 @@ -package goreleaser +package goreleaserlib import ( "io/ioutil" diff --git a/cmd/goreleaser/main.go b/main.go similarity index 91% rename from cmd/goreleaser/main.go rename to main.go index b5cf50996..dabbe1deb 100644 --- a/cmd/goreleaser/main.go +++ b/main.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/goreleaser/goreleaser" + "github.com/goreleaser/goreleaser/goreleaserlib" "github.com/urfave/cli" ) @@ -41,7 +41,7 @@ func main() { } app.Action = func(c *cli.Context) error { log.Printf("Running goreleaser %v\n", version) - if err := goreleaser.Release(c); err != nil { + if err := goreleaserlib.Release(c); err != nil { return cli.NewExitError(err.Error(), 1) } return nil