-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes error message and formats command line output (#139)
- Loading branch information
1 parent
5544687
commit c9de5a7
Showing
9 changed files
with
533 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package models | ||
|
||
import sh "github.com/codeskyblue/go-sh" | ||
|
||
// OneBuildExecutionPlan holds all information for the execution strategy | ||
type OneBuildExecutionPlan struct { | ||
Before *CommandContext | ||
Commands []*CommandContext | ||
After *CommandContext | ||
} | ||
|
||
// CommandContext holds all meta-data and required information for execution of a command | ||
type CommandContext struct { | ||
Name string | ||
Command string | ||
CommandSession *sh.Session | ||
} | ||
|
||
func (executionPlan *OneBuildExecutionPlan) HasBefore() bool { | ||
return executionPlan.Before != nil | ||
} | ||
|
||
func (executionPlan *OneBuildExecutionPlan) HasAfter() bool { | ||
return executionPlan.After != nil | ||
} | ||
|
||
func (executionPlan *OneBuildExecutionPlan) HasCommands() bool { | ||
return len(executionPlan.Commands) > 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.