Documentation ¶
Overview ¶
Package cmd provides utilities for managing apps and packages that use the Cogent Core framework.
Index ¶
- Variables
- func Build(c *config.Config) error
- func BuildDesktop(c *config.Config, platform config.Platform) error
- func Changed(c *config.Config) error
- func Install(c *config.Config) error
- func Log(c *config.Config) error
- func NextRelease(c *config.Config) error
- func NextVersion(c *config.Config) (string, error)
- func Pack(c *config.Config) error
- func PackDarwin(c *config.Config) error
- func PackLinux(c *config.Config) error
- func PackWindows(c *config.Config) error
- func Pull(c *config.Config) error
- func Release(c *config.Config) error
- func Run(c *config.Config) error
- func Setup(c *config.Config) error
- type DebianControlData
- type DesktopFileData
- type DmgBuildData
- type InfoPlistData
- type WindowsInstallerData
Constants ¶
This section is empty.
Variables ¶
var DebianControlTmpl = template.Must(template.New("DebianControlTmpl").Parse(
`Package: {{.Name}}
Version: {{.Version}}
Section: base
Priority: optional
Architecture: all
Maintainer: Your Name <you@email.com>
Description: {{.Desc}}
`))
DebianControlTmpl is the template for the Linux DEBIAN/control file
var DesktopFileTmpl = template.Must(template.New("DesktopFileTmpl").Parse(
`[Desktop Entry]
Type=Application
Version=1.0
Name={{.Name}}
Comment={{.Desc}}
Exec={{.Exec}}
Icon={{.Exec}}
Terminal=false
`))
DesktopFileTmpl is the template for the Linux .desktop file
var DmgBuildTmpl = template.Must(template.New("DmgBuildTmpl").Parse(
`files = ['{{.AppPath}}']
symlinks = {"Applications": "/Applications"}
icon = '{{.IconPath}}'
icon_locations = {'{{.AppName}}': (140, 120), "Applications": (500, 120)}
background = "builtin-arrow"
`))
DmgBuildTmpl is the template for the dmgbuild python settings file
var InfoPlistTmpl = template.Must(template.New("InfoPlistTmpl").Parse(
`<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>{{ .Name }}</string>
<key>CFBundleExecutable</key>
<string>{{ .Executable }}</string>
<key>CFBundleIdentifier</key>
<string>{{ .Identifier }}</string>
<key>CFBundleVersion</key>
<string>{{ .Version }}</string>
<key>CFBundleGetInfoString</key>
<string>{{ .InfoString }}</string>
<key>CFBundleShortVersionString</key>
<string>{{ .ShortVersionString }}</string>
<key>CFBundleIconFile</key>
<string>{{ .IconFile }}</string>
</dict>
</plist>
`))
InfoPlistTmpl is the template for the macOS .app Info.plist
var WindowsInstallerTmpl = template.Must(template.New("WindowsInstallerTmpl").Parse(windowsInstallerTmplString))
WindowsInstallerTmpl is the template for the Windows installer Go file
Functions ¶
func Build ¶
Build builds an executable for the package at the config path for the config platforms.
func BuildDesktop ¶
BuildDesktop builds an executable for the config package for the given desktop platform. BuildDesktop does not check whether platforms are valid, so it should be called through Build in almost all cases.
func Changed ¶
Changed concurrently prints all of the repositories within this directory that have been changed and need to be updated in Git.
func Install ¶
Install installs the package on the local system. It uses the same config info as build.
func Log ¶
Log prints the logs from your app running on Android to the terminal. Android is the only supported platform for log; use the -debug flag on run for other platforms.
func NextRelease ¶
NextRelease releases the project with the current git version tag incremented by one patch version.
func NextVersion ¶
NextVersion returns the version of the project incremented by one patch version.
func Pack ¶
Pack builds and packages the app for the target platform. For android, ios, and web, it is equivalent to build.
func PackDarwin ¶
PackDarwin packages the app for macOS by generating a .app and .dmg file.
func PackWindows ¶
PackWindows packages the app for Windows by generating a .msi file.
Types ¶
type DebianControlData ¶
DebianControlData is the data passed to DebianControlTmpl
type DesktopFileData ¶
DesktopFileData is the data passed to DesktopFileTmpl
type DmgBuildData ¶
DmgBuildData is the data passed to DmgBuildTmpl
type InfoPlistData ¶
type InfoPlistData struct { Name string Executable string Identifier string Version string InfoString string ShortVersionString string IconFile string }
InfoPlistData is the data passed to InfoPlistTmpl
type WindowsInstallerData ¶
WindowsInstallerData is the data passed to WindowsInstallerTmpl