You've already forked goreleaser
							
							
				mirror of
				https://github.com/goreleaser/goreleaser.git
				synced 2025-10-30 23:58:09 +02:00 
			
		
		
		
	adding more tests and godocs
This commit is contained in:
		
							
								
								
									
										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 | ||||
| [](https://travis-ci.org/goreleaser/goreleaser) | ||||
| [](https://coveralls.io/github/goreleaser/goreleaser?branch=master) | ||||
| [](https://goreportcard.com/report/github.com/goreleaser/goreleaser) | ||||
| [](http://godoc.org/github.com/goreleaser/goreleaser) | ||||
| [](https://saythanks.io/to/caarlos0) | ||||
| [](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 ( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user