Files
aptly/main.go
Benj Fassbind 1d4e6183be Capture coverage of integration tests
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.
2022-07-13 08:33:48 +02:00

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))
}