Aptly script has now become aptly task

It makes more sense. Multiple lines of aptly commands can now be called
'aptly tasks' which could potentially be automated, in the future?
This commit is contained in:
Simon Aquino
2014-08-16 14:14:56 +00:00
parent 18e3ed5d64
commit 005cee572e
3 changed files with 11 additions and 11 deletions

View File

@@ -57,9 +57,9 @@ package environment to new version.`,
makeCmdGraph(),
makeCmdMirror(),
makeCmdRepo(),
makeCmdScript(),
makeCmdServe(),
makeCmdSnapshot(),
makeCmdTask(),
makeCmdPublish(),
makeCmdVersion(),
},

View File

@@ -4,12 +4,12 @@ import (
"github.com/smira/commander"
)
func makeCmdScript() *commander.Command {
func makeCmdTask() *commander.Command {
return &commander.Command{
UsageLine: "script",
Short: "run aptly scripts",
UsageLine: "task",
Short: "manage aptly tasks",
Subcommands: []*commander.Command{
makeCmdScriptRun(),
makeCmdTaskRun(),
},
}
}

View File

@@ -11,7 +11,7 @@ import (
"github.com/wsxiaoys/terminal/color"
)
func aptlyScriptRun(cmd *commander.Command, args []string) error {
func aptlyTaskRun(cmd *commander.Command, args []string) error {
var err error
var cmd_list [][]string
@@ -127,17 +127,17 @@ func formatCommands(args []string) [][]string {
return cmd_array
}
func makeCmdScriptRun() *commander.Command {
func makeCmdTaskRun() *commander.Command {
cmd := &commander.Command{
Run: aptlyScriptRun,
Run: aptlyTaskRun,
UsageLine: "run <filename> | <command1>, <command2>, ...",
Short: "run aptly scripts",
Short: "run aptly tasks",
Long: `
Command runs multiple aptly commands in one single aptly thread.
Command helps origanise multiple aptly commands in one single aptly task, running as single thread.
Example:
$ aptly script run
$ aptly task run
> repo create local
> repo add local pkg1
> publish repo local