Documentation ¶
Overview ¶
Package jiri provides utilities used by the jiri tool and related tools.
Index ¶
- Constants
- func ExpandEnv(x *X, env *envvar.Vars)
- func FindRoot() string
- func RunnerFunc(run func(*X, []string) error) cmdline.Runner
- type RelPath
- type X
- func (x *X) BinDir() string
- func (x *X) Clone(opts tool.ContextOpts) *X
- func (x *X) JiriManifestFile() string
- func (x *X) ProfilesDBDir() string
- func (x *X) ProfilesRootDir() string
- func (x *X) RootMetaDir() string
- func (x *X) ScriptsDir() string
- func (x *X) UpdateHistoryDir() string
- func (x *X) UpdateHistoryLatestLink() string
- func (x *X) UpdateHistorySecondLatestLink() string
- func (x *X) UsageErrorf(format string, args ...interface{}) error
Constants ¶
const ( RootEnv = "JIRI_ROOT" RootMetaDir = ".jiri_root" ProjectMetaDir = ".jiri" ProjectMetaFile = "metadata.v2" ProfilesDBDir = RootMetaDir + string(filepath.Separator) + "profile_db" ProfilesRootDir = RootMetaDir + string(filepath.Separator) + "profiles" JiriManifestFile = ".jiri_manifest" // PreservePathEnv is the name of the environment variable that, when set to a // non-empty value, causes jiri tools to use the existing PATH variable, // rather than mutating it. PreservePathEnv = "JIRI_PRESERVE_PATH" )
Variables ¶
This section is empty.
Functions ¶
func ExpandEnv ¶
ExpandEnv expands all instances of the JIRI_ROOT variable in the supplied environment with the root from jirix.
func FindRoot ¶
func FindRoot() string
FindRoot returns the root directory of the jiri environment. All state managed by jiri resides under this root.
If the RootEnv environment variable is non-empty, we always attempt to use it. It must point to an absolute path, after symlinks are evaluated. TODO(toddw): Walk up the filesystem too.
Returns an empty string if the root directory cannot be determined, or if any errors are encountered.
FindRoot should be rarely used; typically you should use NewX to create a new execution environment, and handle errors. An example of a valid usage is to initialize default flag values in an init func before main.
Types ¶
type RelPath ¶
type RelPath string
RelPath represents a relative path whose root is JIRI_ROOT.
func NewRelPath ¶
NewRelPath returns a RelPath with path consisting of the specified components.
func (RelPath) Abs ¶
Abs returns an absolute path corresponding to the RelPath rooted at the JIRI_ROOT in X.
type X ¶
X holds the execution environment for the jiri tool and related tools. This includes the jiri filesystem root directory.
TODO(toddw): Other jiri state should be transitioned to this struct, including the manifest and related operations.
func NewX ¶
NewX returns a new execution environment, given a cmdline env. It also prepends $JIRI_ROOT/.jiri_root/bin to the PATH.
func (*X) Clone ¶
func (x *X) Clone(opts tool.ContextOpts) *X
Clone returns a clone of the environment.
func (*X) JiriManifestFile ¶
JiriManifestFile returns the path to the .jiri_manifest file.
func (*X) ProfilesDBDir ¶
ProfilesDBDir returns the path to the profiles data base directory.
func (*X) ProfilesRootDir ¶
ProfilesRootDir returns the path to the root of the profiles installation.
func (*X) RootMetaDir ¶
RootMetaDir returns the path to the root metadata directory.
func (*X) ScriptsDir ¶
ScriptsDir returns the path to the scripts directory.
func (*X) UpdateHistoryDir ¶
UpdateHistoryDir returns the path to the update history directory.
func (*X) UpdateHistoryLatestLink ¶
UpdateHistoryLatestLink returns the path to a symlink that points to the latest update in the update history directory.
func (*X) UpdateHistorySecondLatestLink ¶
UpdateHistorySecondLatestLink returns the path to a symlink that points to the second latest update in the update history directory.
func (*X) UsageErrorf ¶
UsageErrorf prints the error message represented by the printf-style format and args, followed by the usage output. The implementation typically calls cmdline.Env.UsageErrorf.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
jiri
Command jiri is a multi-purpose tool for multi-repo development.
|
Command jiri is a multi-purpose tool for multi-repo development. |
Package gerrit provides library functions for interacting with the gerrit code review system.
|
Package gerrit provides library functions for interacting with the gerrit code review system. |
Package gitutil provides Go wrappers for various Git commands.
|
Package gitutil provides Go wrappers for various Git commands. |
Package jiritest provides utilities for testing jiri functionality.
|
Package jiritest provides utilities for testing jiri functionality. |
Package profiles and its subdirectoris implement support for managing external sofware dependencies.
|
Package profiles and its subdirectoris implement support for managing external sofware dependencies. |
profilescmdline
Package profilescmdline provides a command line driver (for v.io/x/lib/cmdline) for implementing jiri 'profile' subcommands.
|
Package profilescmdline provides a command line driver (for v.io/x/lib/cmdline) for implementing jiri 'profile' subcommands. |
profilescmdline/internal/i1
Profiles are used to manage external sofware dependencies and offer a balance between providing no support at all and a full blown package manager.
|
Profiles are used to manage external sofware dependencies and offer a balance between providing no support at all and a full blown package manager. |
profilescmdline/internal/i2
Profiles are used to manage external sofware dependencies and offer a balance between providing no support at all and a full blown package manager.
|
Profiles are used to manage external sofware dependencies and offer a balance between providing no support at all and a full blown package manager. |
profilesmanager
Package profilesmanager provides support for managing jiri profiles.
|
Package profilesmanager provides support for managing jiri profiles. |
profilesreader
Package profilesreader provides support for reading and processing jiri profiles.
|
Package profilesreader provides support for reading and processing jiri profiles. |
profilesutil
package profilesutil provides utility routines for implementing profiles.
|
package profilesutil provides utility routines for implementing profiles. |
Package project contains library functions for working with jiri projects.
|
Package project contains library functions for working with jiri projects. |
Package retry provides a facility for retrying function invocations.
|
Package retry provides a facility for retrying function invocations. |
Package tool contains abstractions for working with developer tools.
|
Package tool contains abstractions for working with developer tools. |