Documentation
¶
Overview ¶
Package packman provides utilities for managing apps and packages that use the GoKi framework.
Index ¶
- func AppName(pkgPath string) string
- func ArgsString(args []string) string
- func Build(c *config.Config) error
- func BuildPath(pkgPath string) string
- func CmdString(cmd *exec.Cmd) string
- func GenerateColorScheme(c *config.Config) error
- func Install(c *config.Config) error
- func InstallLocal(c *config.Config) error
- func InstallPackage(pkg Package) error
- func Log(c *config.Config) error
- func PushGitRelease(c *config.Config) error
- func PushVersionFileGit(c *config.Config) error
- func Release(c *config.Config) error
- func ReleaseApp(c *config.Config) error
- func ReleaseLibrary(c *config.Config) error
- func RunCmd(cmd *exec.Cmd) ([]byte, error)
- func UpdateVersion(c *config.Config) error
- func VersionFileString(c *config.Config) (string, error)
- type ColorSchemeColor
- type ColorSchemeData
- type Command
- type Commands
- type Package
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArgsString ¶
ArgsString returns a string representation of the given command arguments.
func Build ¶
Build builds an executable for the package at the config path for the config platforms.
func BuildPath ¶
BuildPath returns the path to the build binary output directory from the given package path.
func GenerateColorScheme ¶
GenerateColorScheme generates a Go color scheme declaration file from a Material Theme Builder Android Views XML file located at the config source file path. It stores the resulting Go file at the config destination file path. The generated file is part of the config package and puts the config comment as the comment for the ColorSchemes variable.
func Install ¶
Install installs the package the config ID by looking for it in the list of supported packages. If the config ID is a filepath, it calls InstallLocal instead.
func InstallLocal ¶
InstallLocal installs a local package from the filesystem on the user's device for the config target operating systems.
func InstallPackage ¶
InstallPackage installs the given package object.
func Log ¶
Log prints the logs from your app running on the config operating system (android or ios) to the terminal
func PushGitRelease ¶
PushGitRelease commits a release commit using Git, adds a version tag, and pushes the code and tags based on the given config info.
func PushVersionFileGit ¶ added in v0.1.10
PushVersionFileGit makes and pushes a Git commit updating the version file based on the given config info. It does not actually update the version file; it only commits and pushes the changes that should have already been made by UpdateVersion.
func Release ¶
Release releases the config project by calling ReleaseApp if it is an app and ReleaseLibrary if it is a library.
func ReleaseLibrary ¶
ReleaseLibrary releases the config library.
func RunCmd ¶ added in v0.1.2
RunCmd runs the given command and returns the combined output and any error encountered. If there is an error running the command, RunCmd wraps it and includes the output of the command in the resulting error message.
func UpdateVersion ¶ added in v0.1.10
UpdateVersion updates the version file of the config project based on the given config info and commits and pushes the changes.
Types ¶
type ColorSchemeColor ¶
type ColorSchemeColor struct {
XMLName xml.Name `xml:"color"`
Name string `xml:"name,attr"`
Color string `xml:",chardata"`
}
ColorSchemeColor contains the data for one color in a ColorSchemeData object.
func (*ColorSchemeColor) FixName ¶
func (c *ColorSchemeColor) FixName()
Camel fixes the name of the color to be correctly formatted camel case with any prefixes removed
func (*ColorSchemeColor) IsDark ¶
func (c *ColorSchemeColor) IsDark() bool
IsDark returns whether the color scheme color is a color for dark mode. It also removes the Light/Dark prefix from the color's name. It panics if it the color is for neither light nor dark mode.
func (*ColorSchemeColor) IsValid ¶
func (c *ColorSchemeColor) IsValid() bool
IsValid returns whether the color is a valid color that can be used in a color scheme.
type ColorSchemeData ¶
type ColorSchemeData struct {
XMLName xml.Name `xml:"resources"`
Colors []ColorSchemeColor `xml:",any"`
}
ColorSchemeData contains the data of a color scheme Material Theme Builder Android Views XML file.
func GetColorSchemeData ¶
func GetColorSchemeData(fpath string) (ColorSchemeData, error)
GetColorSchemeData gets the ColorSchemeData from the XML file located at the given filepath.
type Package ¶
type Package struct {
ID string // the unique name of the package (ex: dev)
Name string // the user friendly name of the package (ex: The GoKi Developer Tools)
InstallCommands Commands // the set of commands to run for each operating system to install the package
}
Package contains all of the information about a package.
func LoadPackages ¶
LoadPackages loads all of the packages from the packages.json file