mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
To capture the coverage also for the integration tests, a test only executing the cmd.Run function is used. The test always exits with code 0 and prints the real exit code to stdout. Otherwise no coverage report is generated. Those changes enable a more accurate coverage report for future contributions.
29 lines
415 B
Go
29 lines
415 B
Go
package main
|
|
|
|
import (
|
|
"math/rand"
|
|
"os"
|
|
"time"
|
|
|
|
"github.com/aptly-dev/aptly/aptly"
|
|
"github.com/aptly-dev/aptly/cmd"
|
|
|
|
_ "embed"
|
|
)
|
|
|
|
//go:generate sh -c "make -s version | tr -d '\n' > VERSION"
|
|
//go:embed VERSION
|
|
var Version string
|
|
|
|
func main() {
|
|
if Version == "" {
|
|
Version = "unknown"
|
|
}
|
|
|
|
aptly.Version = Version
|
|
|
|
rand.Seed(time.Now().UnixNano())
|
|
|
|
os.Exit(cmd.Run(cmd.RootCommand(), os.Args[1:], true))
|
|
}
|