func main() { cli.ParseFlagsOrDie("please_maven", "5.5.0", &opts) cli.InitLogging(opts.Verbosity) for _, pkg := range opts.Args.Package { split := strings.Split(pkg, ":") if len(split) != 3 { log.Fatalf("Incorrect usage: argument %s must be in the form group:artifact:version\n", pkg) } pom := fetchAndParse(split[0], split[1], split[2]) process(pom, split[0], split[1], split[2]) } }
func main() { cli.ParseFlagsOrDie("plz_go_test", "5.5.0", &opts) cli.InitLogging(opts.Verbosity) coverVars, err := buildgo.FindCoverVars(opts.Dir, opts.Exclude) if err != nil { log.Fatalf("Error scanning for coverage: %s", err) } if err = buildgo.WriteTestMain(opts.Package, opts.Sources.Sources, opts.Output, coverVars); err != nil { log.Fatalf("Error writing test main: %s", err) } os.Exit(0) }
func main() { cli.ParseFlagsOrDie("Please graph differ", "5.5.0", &opts) cli.InitLogging(opts.Verbosity) before := misc.ParseGraphOrDie(opts.Before) after := misc.ParseGraphOrDie(opts.After) if len(opts.ChangedFiles.Files) == 1 && opts.ChangedFiles.Files[0] == "-" { opts.ChangedFiles.Files = readStdin() } for _, label := range misc.DiffGraphs(before, after, opts.ChangedFiles.Files, opts.Include, opts.Exclude, !opts.NoRecurse) { fmt.Printf("%s\n", label) } }
func main() { cli.ParseFlagsOrDie("Jarcat", "5.5.0", &opts) if opts.DumbMode { opts.Suffix = nil opts.ExcludeSuffix = nil opts.IncludeOther = true } cli.InitLogging(opts.Verbosity) if err := combine(opts.Out, opts.In, opts.Preamble, opts.StripPrefix, opts.MainClass, opts.ExcludeInternalPrefix, opts.ExcludeSuffix, opts.Suffix, opts.IncludeInternalPrefix, opts.Strict, opts.IncludeOther, opts.AddInitPy, !opts.NoDirEntries, opts.RenameDirs); err != nil { log.Fatalf("Error combining zip files: %s\n", err) } os.Exit(0) }
func main() { cli.ParseFlagsOrDie("Please HTTP cache server", "5.5.0", &opts) cli.InitLogging(opts.Verbosity) if opts.LogFile != "" { cli.InitFileLogging(opts.LogFile, opts.Verbosity) } log.Notice("Initialising cache server...") cache := server.NewCache(opts.Dir, time.Duration(opts.CleanFlags.CleanFrequency), time.Duration(opts.CleanFlags.MaxArtifactAge), uint64(opts.CleanFlags.LowWaterMark), uint64(opts.CleanFlags.HighWaterMark)) log.Notice("Starting up http cache server on port %d...", opts.Port) router := server.BuildRouter(cache) http.Handle("/", router) http.ListenAndServe(fmt.Sprintf(":%d", opts.Port), router) }
func main() { cli.ParseFlagsOrDie("Please RPC cache server", "5.5.0", &opts) cli.InitLogging(opts.Verbosity) if opts.LogFile != "" { cli.InitFileLogging(opts.LogFile, opts.Verbosity) } if (opts.TLSFlags.KeyFile == "") != (opts.TLSFlags.CertFile == "") { log.Fatalf("Must pass both --key_file and --cert_file if you pass one") } else if opts.TLSFlags.KeyFile == "" && (opts.TLSFlags.WritableCerts != "" || opts.TLSFlags.ReadonlyCerts != "") { log.Fatalf("You can only use --writable_certs / --readonly_certs with https (--key_file and --cert_file)") } log.Notice("Scanning existing cache directory %s...", opts.Dir) cache := server.NewCache(opts.Dir, time.Duration(opts.CleanFlags.CleanFrequency), time.Duration(opts.CleanFlags.MaxArtifactAge), uint64(opts.CleanFlags.LowWaterMark), uint64(opts.CleanFlags.HighWaterMark)) log.Notice("Starting up RPC cache server on port %d...", opts.Port) server.ServeGrpcForever(opts.Port, cache, opts.TLSFlags.KeyFile, opts.TLSFlags.CertFile, opts.TLSFlags.CACertFile, opts.TLSFlags.ReadonlyCerts, opts.TLSFlags.WritableCerts) }
func main() { cli.ParseFlagsOrDie("Please directory cache cleaner", "5.5.0", &opts) cli.InitLogging(opts.Verbosity) start(opts.Directory, int64(opts.HighWaterMark), int64(opts.LowWaterMark)) os.Exit(0) }