refactor(ci): improve testing

This commit is contained in:
Nightapes
2019-07-16 20:42:40 +02:00
parent c86ad684c6
commit ab14ab397c
5 changed files with 30 additions and 29 deletions

View File

@@ -3,7 +3,6 @@ package ci
import (
"fmt"
"github.com/Nightapes/go-semantic-release/internal/gitutil"
"os"
)
//Git struct
@@ -12,9 +11,9 @@ type Git struct {
}
//Detect if on Git
func (t Git) detect() (*ProviderConfig, error) {
func (t Git) detect(envs map[string]string) (*ProviderConfig, error) {
if _, exists := os.LookupEnv("CI"); !exists {
if _, exists := envs["CI"]; !exists {
return nil, fmt.Errorf("running not git only")
}