| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // This tool provides access to the set of outputs generated by Fuchsia CI builds. Build |
| // output directories are referenced by build id. |
| // |
| // Example usage: |
| // |
| // $ artifacts ls -build=123 |
| // $ artifacts cp -build=123 -src=packages.tar.gz -dst=local/packages.tar.gz |
| // $ artifacts storetestoutputs -build=123 -testenv=TEST_ENV outputs.json |
| |
| package main |
| |
| import ( |
| "context" |
| "flag" |
| "github.com/google/subcommands" |
| "os" |
| ) |
| |
| func main() { |
| subcommands.Register(subcommands.HelpCommand(), "") |
| subcommands.Register(subcommands.CommandsCommand(), "") |
| subcommands.Register(subcommands.FlagsCommand(), "") |
| subcommands.Register(&ListCommand{}, "") |
| subcommands.Register(&CopyCommand{}, "") |
| subcommands.Register(&StoreTestOutputsCommand{}, "") |
| |
| flag.Parse() |
| os.Exit(int(subcommands.Execute(context.Background()))) |
| } |