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:
parent
6a66e60e55
commit
3bc428120d
3
Makefile
3
Makefile
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// Package checksum contain algorithms to checksum files
|
||||
package checksum
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
// Package clients contains the client implementations for several providers.
|
||||
package clients
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
// Package config contains the model and loader of the goreleaser configuration
|
||||
// file.
|
||||
package config
|
||||
|
||||
import (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -1,3 +1,5 @@
|
||||
// Package tar implements the Archive interface providing tar.gz archiving
|
||||
// and compression.
|
||||
package tar
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
// Package zip implements the Archive interface providing zip archiving
|
||||
// and compression.
|
||||
package zip
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
// Package brew implements the Pipe, providing formula generation and
|
||||
// uploading it to a configured repo.
|
||||
package brew
|
||||
|
||||
import (
|
||||
|
@ -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 (
|
||||
|
@ -1,3 +1,5 @@
|
||||
// Package checksums provides a Pipe that creates .checksums files for
|
||||
// each artifact.
|
||||
package checksums
|
||||
|
||||
import (
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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
2
pipeline/env/env.go
vendored
@ -1,3 +1,5 @@
|
||||
// Package env implements the Pipe interface providing validation of
|
||||
// missing environment variables needed by the release process.
|
||||
package env
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
// Package fpm implements the Pipe interface providing FPM bindings.
|
||||
package fpm
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
// Package git implements the Pipe interface extracting usefull data from
|
||||
// git and putting it in the context.
|
||||
package git
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
// Package pipeline provides a generic pipe interface.
|
||||
package pipeline
|
||||
|
||||
import "github.com/goreleaser/goreleaser/context"
|
||||
|
@ -1,3 +1,5 @@
|
||||
// Package release implements Pipe and manages github releases and its
|
||||
// artifacts.
|
||||
package release
|
||||
|
||||
import (
|
||||
|
Loading…
x
Reference in New Issue
Block a user