github.com/kekek/gb@v0.4.5-0.20170222120241-d4ba64b0b297/cmd/gb/alldocs.go (about)

     1  // DO NOT EDIT THIS FILE.
     2  //go:generate gb help documentation
     3  
     4  /*
     5  gb, a project based build tool for the Go programming language.
     6  
     7  Usage:
     8  
     9          gb command [arguments]
    10  
    11  The commands are:
    12  
    13          build       build a package
    14          doc         show documentation for a package or symbol
    15          env         print project environment variables
    16          generate    generate Go files by processing source
    17          info        info returns information about this project
    18          list        list the packages named by the importpaths
    19          test        test packages
    20  
    21  Use "gb help [command]" for more information about a command.
    22  
    23  Additional help topics:
    24  
    25          plugin      plugin information
    26          project     gb project layout
    27  
    28  Use "gb help [topic]" for more information about that topic.
    29  
    30  
    31  Build a package
    32  
    33  Usage:
    34  
    35          gb build [build flags] [packages]
    36  
    37  Build compiles the packages named by the import paths, along with their
    38  dependencies.
    39  
    40  Flags:
    41  
    42  	-f
    43  		ignore cached packages if present, new packages built will overwrite
    44  		any cached packages. This effectively disables incremental
    45  		compilation.
    46  	-F
    47  		do not cache packages, cached packages will still be used for
    48  		incremental compilation. -f -F is advised to disable the package
    49  		caching system.
    50  	-P
    51  		The number of build jobs to run in parallel, including test execution.
    52  		By default this is the number of CPUs visible to gb.
    53  	-R
    54  		sets the base of the project root search path from the current working
    55  		directory to the value supplied. Effectively gb changes working
    56  		directory to this path before searching for the project root.
    57  	-dotfile
    58  		if provided, gb will output a dot formatted file of the build steps to
    59  		be performed.
    60  	-ldflags 'flag list'
    61  		arguments to pass on each linker invocation.
    62  	-gcflags 'arg list'
    63  		arguments to pass on each compile invocation.
    64          -race
    65                  enable data race detection.
    66                  Supported only on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64.
    67  	-tags 'tag list'
    68  		additional build tags.
    69  
    70  The list flags accept a space-separated list of strings. To embed spaces in an
    71  element in the list, surround it with either single or double quotes.
    72  
    73  For more about where packages and binaries are installed, run 'gb help project'.
    74  
    75  
    76  Show documentation for a package or symbol
    77  
    78  Usage:
    79  
    80          gb doc <pkg> <sym>[.<method>]
    81  
    82  Doc shows documentation for a package or symbol.
    83  
    84  See 'go help doc'.
    85  
    86  
    87  Print project environment variables
    88  
    89  Usage:
    90  
    91          gb env [var ...]
    92  
    93  Env prints project environment variables. If one or more variable names is
    94  given as arguments, env prints the value of each named variable on its own line.
    95  
    96  
    97  Generate Go files by processing source
    98  
    99  Usage:
   100  
   101          gb generate [-run regexp] [file.go... | packages]
   102  
   103  Generate runs commands described by directives within existing files.
   104  
   105  Those commands can run any process, but the intent is to create or update Go
   106  source files, for instance by running yacc.
   107  
   108  See 'go help generate'.
   109  
   110  
   111  Info returns information about this project
   112  
   113  Usage:
   114  
   115          gb info [var ...]
   116  
   117  info prints gb environment information.
   118  
   119  Values:
   120  
   121  	GB_PROJECT_DIR
   122  		The root of the gb project.
   123  	GB_SRC_PATH
   124  		The list of gb project source directories.
   125  	GB_PKG_DIR
   126  		The path of the gb project's package cache.
   127  	GB_BIN_SUFFIX
   128  		The suffix applied any binary written to $GB_PROJECT_DIR/bin
   129  	GB_GOROOT
   130  		The value of runtime.GOROOT for the Go version that built this copy of gb.
   131  
   132  info returns 0 if the project is well formed, and non zero otherwise.
   133  If one or more variable names is given as arguments, info prints the
   134  value of each named variable on its own line.
   135  
   136  
   137  List the packages named by the importpaths
   138  
   139  Usage:
   140  
   141          gb list [-s] [-f format] [-json] [packages]
   142  
   143  List lists packages imported by the project.
   144  
   145  The default output shows the package import paths:
   146  
   147  	% gb list github.com/constabulary/...
   148  	github.com/constabulary/gb
   149  	github.com/constabulary/gb/cmd
   150  	github.com/constabulary/gb/cmd/gb
   151  	github.com/constabulary/gb/cmd/gb-env
   152  	github.com/constabulary/gb/cmd/gb-list
   153  
   154  Flags:
   155  	-f
   156  		alternate format for the list, using the syntax of package template.
   157  		The default output is equivalent to -f '{{.ImportPath}}'. The struct
   158  		being passed to the template is currently an instance of gb.Package.
   159  		This structure is under active development and it's contents are not
   160  		guaranteed to be stable.
   161  	-s
   162  		read format template from STDIN.
   163  	-json
   164  		prints output in structured JSON format. WARNING: gb.Package
   165  		structure is not stable and will change in the future!
   166  
   167  
   168  Plugin information
   169  
   170  gb supports git style plugins.
   171  
   172  A gb plugin is anything in the $PATH with the prefix gb-. In other words
   173  gb-something, becomes gb something.
   174  
   175  gb plugins are executed from the parent gb process with the environment
   176  variable, GB_PROJECT_DIR set to the root of the current project.
   177  
   178  gb plugins can be executed directly but this is rarely useful, so authors
   179  should attempt to diagnose this by looking for the presence of the
   180  GB_PROJECT_DIR environment key.
   181  
   182  
   183  Gb project layout
   184  
   185  A gb project is defined as any directory that contains a src/ subdirectory.
   186  gb automatically detects the root of the project by looking at the current
   187  working directory and walking backwards until it finds a directory that
   188  contains a src/ subdirectory.
   189  
   190  In the event you wish to override this auto detection mechanism, the -R flag
   191  can be used to supply a project root.
   192  
   193  See http://getgb.io/docs/project for details
   194  
   195  
   196  Test packages
   197  
   198  Usage:
   199  
   200          gb test [build flags] -n -v [packages] [flags for test binary]
   201  
   202  Test automates testing the packages named by the import paths.
   203  
   204  'gb test' recompiles each package along with any files with names matching
   205  the file pattern "*_test.go".
   206  
   207  Flags:
   208  
   209          -v
   210                  print output from test subprocess.
   211  	-n
   212  		do not execute test binaries, compile only
   213  
   214  
   215  */
   216  package main