1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-07 13:31:37 +02:00

adding more tests and godocs

This commit is contained in:
Carlos Alexandro Becker 2017-04-14 15:39:32 -03:00
parent 6a66e60e55
commit 3bc428120d
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
19 changed files with 50 additions and 0 deletions

View File

@ -13,6 +13,9 @@ setup: ## Install all the build and lint dependencies
test: ## Run all the tests
gotestcover $(TEST_OPTIONS) -covermode=count -coverprofile=coverage.out $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=30s
cover: test ## RUn all the tests and opens the coverage report
go tool cover -html=coverage.out
fmt: ## gofmt and goimports all go files
find . -name '*.go' -not -wholename './vendor/*' | while read -r file; do gofmt -w -s "$$file"; goimports -w "$$file"; done

View File

@ -13,6 +13,7 @@ We appreciate your contribution. Please refer to our [contributing guidelines](C
[![Travis](https://img.shields.io/travis/goreleaser/goreleaser.svg?style=flat-square)](https://travis-ci.org/goreleaser/goreleaser)
[![Coverage Status](https://img.shields.io/coveralls/goreleaser/goreleaser/master.svg?style=flat-square)](https://coveralls.io/github/goreleaser/goreleaser?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/goreleaser/goreleaser?style=flat-square)](https://goreportcard.com/report/github.com/goreleaser/goreleaser)
[![](https://godoc.org/github.com/goreleaser/goreleaser?status.svg&style=flat-square)](http://godoc.org/github.com/goreleaser/goreleaser)
[![SayThanks.io](https://img.shields.io/badge/SayThanks.io-%E2%98%BC-1EAEDB.svg?style=flat-square)](https://saythanks.io/to/caarlos0)
[![Powered By: GoReleaser](https://img.shields.io/badge/powered%20by-goreleaser-green.svg?style=flat-square)](https://github.com/goreleaser)

View File

@ -1,3 +1,4 @@
// Package checksum contain algorithms to checksum files
package checksum
import (

View File

@ -1,3 +1,4 @@
// Package clients contains the client implementations for several providers.
package clients
import (

View File

@ -1,3 +1,5 @@
// Package config contains the model and loader of the goreleaser configuration
// file.
package config
import (

View File

@ -1,3 +1,9 @@
// Package context provides gorelease context which is passed through the
// pipeline.
//
// The context extends the standard library context and add a few more
// fields and other things, so pipes can gather data provided by previous
// pipes without really knowing each other.
package context
import (

View File

@ -1,3 +1,6 @@
// Package archive implements the pipe interface with the intent of
// archiving and compressing the binaries, readme, and other artifacts. It
// also provides an Archive interface which represents an archiving format.
package archive
import (

View File

@ -1,3 +1,5 @@
// Package tar implements the Archive interface providing tar.gz archiving
// and compression.
package tar
import (

View File

@ -1,3 +1,5 @@
// Package zip implements the Archive interface providing zip archiving
// and compression.
package zip
import (

View File

@ -1,3 +1,5 @@
// Package brew implements the Pipe, providing formula generation and
// uploading it to a configured repo.
package brew
import (

View File

@ -1,3 +1,5 @@
// Package build implements Pipe and can build Go projects for
// several platforms, with pre and post hook support.
package build
import (

View File

@ -1,3 +1,5 @@
// Package checksums provides a Pipe that creates .checksums files for
// each artifact.
package checksums
import (

View File

@ -40,3 +40,16 @@ func TestPipe(t *testing.T) {
assert.NoError(err)
assert.Contains(string(bts), "61d034473102d7dac305902770471fd50f4c5b26f6831a56dd90b5184b3c30fc binary")
}
func TestPipeFileNotExist(t *testing.T) {
var assert = assert.New(t)
folder, err := ioutil.TempDir("", "gorelasertest")
assert.NoError(err)
var ctx = &context.Context{
Config: config.Project{
Dist: folder,
},
}
ctx.AddArtifact("nope")
assert.Error(Pipe{}.Run(ctx))
}

View File

@ -1,3 +1,5 @@
// Package defaults implements the Pipe interface providing default values
// for missing configuration.
package defaults
import (

2
pipeline/env/env.go vendored
View File

@ -1,3 +1,5 @@
// Package env implements the Pipe interface providing validation of
// missing environment variables needed by the release process.
package env
import (

View File

@ -1,3 +1,4 @@
// Package fpm implements the Pipe interface providing FPM bindings.
package fpm
import (

View File

@ -1,3 +1,5 @@
// Package git implements the Pipe interface extracting usefull data from
// git and putting it in the context.
package git
import (

View File

@ -1,3 +1,4 @@
// Package pipeline provides a generic pipe interface.
package pipeline
import "github.com/goreleaser/goreleaser/context"

View File

@ -1,3 +1,5 @@
// Package release implements Pipe and manages github releases and its
// artifacts.
package release
import (