You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-08-08 04:42:07 +03:00
Refactor repository layout and convert build system to Mage.
This commit implements a massive refactor of the repository, and moves the build system over to use Mage (magefile.org) which should allow seamless building across multiple platforms.
This commit is contained in:
8
tools/vendor/github.com/mattn/goveralls/goveralls.go
generated
vendored
8
tools/vendor/github.com/mattn/goveralls/goveralls.go
generated
vendored
@@ -54,6 +54,7 @@ var (
|
||||
service = flag.String("service", "travis-ci", "The CI service or other environment in which the test suite was run. ")
|
||||
shallow = flag.Bool("shallow", false, "Shallow coveralls internal server errors")
|
||||
ignore = flag.String("ignore", "", "Comma separated files to ignore")
|
||||
show = flag.Bool("show", false, "Show which package is being tested")
|
||||
)
|
||||
|
||||
// usage supplants package flag's Usage variable
|
||||
@@ -149,6 +150,9 @@ func getCoverage() ([]*SourceFile, error) {
|
||||
args = append(args, line)
|
||||
cmd.Args = args
|
||||
|
||||
if *show {
|
||||
fmt.Println("goveralls:", line)
|
||||
}
|
||||
err = cmd.Run()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%v: %v", err, outBuf.String())
|
||||
@@ -234,6 +238,8 @@ func process() error {
|
||||
jobId = circleCiJobId
|
||||
} else if appveyorJobId := os.Getenv("APPVEYOR_JOB_ID"); appveyorJobId != "" {
|
||||
jobId = appveyorJobId
|
||||
} else if semaphoreJobId := os.Getenv("SEMPAHORE_BUILD_NUMBER"); semaphoreJobId != "" {
|
||||
jobId = semaphoreJobId
|
||||
}
|
||||
|
||||
if *repotoken == "" {
|
||||
@@ -250,6 +256,8 @@ func process() error {
|
||||
pullRequest = regexp.MustCompile(`[0-9]+$`).FindString(prURL)
|
||||
} else if prNumber := os.Getenv("APPVEYOR_PULL_REQUEST_NUMBER"); prNumber != "" {
|
||||
pullRequest = prNumber
|
||||
} else if prNumber := os.Getenv("PULL_REQUEST_NUMBER"); prNumber != "" {
|
||||
pullRequest = prNumber
|
||||
}
|
||||
|
||||
sourceFiles, err := getCoverage()
|
||||
|
Reference in New Issue
Block a user