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 committed 2014-08-16 14:14:56 +00:00
1 parent 18e3ed5d64
commit 005cee572e
3 files changed
+11 -11

No files matched your search

+1 -1
View File
@@ -57,9 +57,9 @@ package environment to new version.`,
makeCmdGraph(), makeCmdGraph(),
makeCmdMirror(), makeCmdMirror(),
makeCmdRepo(), makeCmdRepo(),
makeCmdScript(),
makeCmdServe(), makeCmdServe(),
makeCmdSnapshot(), makeCmdSnapshot(),
makeCmdTask(),
makeCmdPublish(), makeCmdPublish(),
makeCmdVersion(), makeCmdVersion(),
}, },
+4 -4
View File
@@ -4,12 +4,12 @@ import (
"github.com/smira/commander" "github.com/smira/commander"
) )
func makeCmdScript() *commander.Command { func makeCmdTask() *commander.Command {
return &commander.Command{ return &commander.Command{
UsageLine: "script", UsageLine: "task",
Short: "run aptly scripts", Short: "manage aptly tasks",
Subcommands: []*commander.Command{ Subcommands: []*commander.Command{
makeCmdScriptRun(), makeCmdTaskRun(),
}, },
} }
} }
+6 -6
View File
@@ -11,7 +11,7 @@ import (
"github.com/wsxiaoys/terminal/color" "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 err error
var cmd_list [][]string var cmd_list [][]string
@@ -127,17 +127,17 @@ func formatCommands(args []string) [][]string {
return cmd_array return cmd_array
} }
func makeCmdScriptRun() *commander.Command { func makeCmdTaskRun() *commander.Command {
cmd := &commander.Command{ cmd := &commander.Command{
Run: aptlyScriptRun, Run: aptlyTaskRun,
UsageLine: "run <filename> | <command1>, <command2>, ...", UsageLine: "run <filename> | <command1>, <command2>, ...",
Short: "run aptly scripts", Short: "run aptly tasks",
Long: ` 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: Example:
$ aptly script run $ aptly task run
> repo create local > repo create local
> repo add local pkg1 > repo add local pkg1
> publish repo local > publish repo local