tasks

package
v0.0.0-...-17c0c07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2015 License: MIT Imports: 33 Imported by: 0

Documentation

Overview

tasks are units of work performed by goxc.

Index

Constants

View Source
const (
	TASK_ZIP   = "archive-zip"
	TASK_TARGZ = "archive-tar-gz"
)
View Source
const (
	TASK_BUILD_TOOLCHAIN = core.TASK_BUILD_TOOLCHAIN

	TASK_CLEAN_DESTINATION = "clean-destination"
	TASK_GO_CLEAN          = "go-clean"

	TASK_GO_VET  = "go-vet"
	TASK_GO_TEST = "go-test"
	TASK_GO_FMT  = "go-fmt"

	TASK_GO_INSTALL = "go-install"
	TASK_XC         = "xc"
	TASK_CODESIGN   = "codesign"

	TASK_COPY_RESOURCES = "copy-resources"
	TASK_ARCHIVE_ZIP    = "archive-zip"
	TASK_ARCHIVE_TAR_GZ = "archive-tar-gz"
	TASK_REMOVE_BIN     = "rmbin" //after zipping
	TASK_DOWNLOADS_PAGE = "downloads-page"
	TASK_DEB_GEN        = "deb"
	TASK_DEB_DEV        = "deb-dev"
	TASK_DEB_SOURCE     = "deb-source"
	TASK_PUBLISH_GITHUB = "publish-github"

	TASKALIAS_ALL        = "all"
	TASKALIAS_ARCHIVE    = "archive"
	TASKALIAS_CLEAN      = "clean"
	TASKALIAS_COMPILE    = "compile"
	TASKALIAS_DEBS       = "debs"
	TASKALIAS_DEFAULT    = "default"
	TASKALIAS_PACKAGE    = "package"
	TASKALIAS_PKG_BUILD  = "pkg-build"
	TASKALIAS_PKG_SOURCE = "pkg-source"
	TASKALIAS_VALIDATE   = "validate"
)
View Source
const TASK_BINTRAY = "bintray"
View Source
const TASK_BUMP = "bump"
View Source
const (
	TASK_INTERPOLATE_SOURCE = "interpolate-source"
)
View Source
const TASK_PUBLISH_HTTP = "publish-http"

TASK_PUBLISH_HTTP is the task name to be used in the CLI

View Source
const TASK_TAG = "tag"

Variables

Functions

func FillTaskSettingsDefaults

func FillTaskSettingsDefaults(settings *config.Settings)

func GetCategory

func GetCategory(relativePath string) string

func Register

func Register(task Task)

Register a task for use by goxc. Call from an 'init' function

func RegisterParallelizable

func RegisterParallelizable(pTask ParallelizableTask)

func ResolveAliases

func ResolveAliases(tasks []string) []string

resolve aliases into tasks TODO recurse. (currently aliases are only lists of tasks, not of aliases). Recursion would enable the extra flexibility

func RunTasks

func RunTasks(workingDirectory string, destPlatforms []platforms.Platform, settings *config.Settings, maxProcessors int) error

run all given tasks

func RunTemplate

func RunTemplate(reportFilename, templateFile, templateText string, out *os.File, data interface{}, format string) (err error)

Types

type BtDownload

type BtDownload struct {
	Text         string
	RelativeLink string
}

type BtReport

type BtReport struct {
	AppName    string
	Version    string
	Categories map[string]*[]BtDownload
	ExtraVars  map[string]interface{}
}

type Download

type Download struct {
	Text         string
	Version      string
	RelativeLink string
}

type ParallelizableTask

type ParallelizableTask struct {
	Name        string
	Description string

	DefaultSettings map[string]interface{}
	// contains filtered or unexported fields
}

type Report

type Report struct {
	AppName    string
	Version    string
	Categories map[string]*[]Download
	ExtraVars  map[string]interface{}
}

type Task

type Task struct {
	Name            string
	Description     string
	Run             func(TaskParams) error
	DefaultSettings map[string]interface{}
}

A task is basically a user-defined function given a unique name, plus some 'default settings'

func ListTasks

func ListTasks() []Task

list all available tasks

type TaskParams

type TaskParams struct {
	DestPlatforms                 []platforms.Platform
	AllPackageDirs                []string
	MainDirs                      []string
	AppName                       string
	WorkingDirectory, OutDestRoot string
	Settings                      *config.Settings
	MaxProcessors                 int
}

Parameter object passed to a task.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL