-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from restechnica/fix/commander-error-handling
fix/commander-error-handling
- Loading branch information
Showing
5 changed files
with
54 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package commands | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
type CommandError struct { | ||
Arguments []string | ||
Output string | ||
Err error | ||
} | ||
|
||
func (e CommandError) Error() string { | ||
return fmt.Sprintf("command %s exited with %s, output: \n%s", e.Arguments, e.Err.Error(), e.Output) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,29 @@ | ||
package cli | ||
|
||
const ( | ||
// DefaultConfig the default config. | ||
DefaultConfig = `[git] | ||
[git.config] | ||
email = "semverbot@github.com" | ||
name = "semverbot" | ||
[git.tags] | ||
prefix = "v" | ||
[semver] | ||
mode = "auto" | ||
[semver.detection] | ||
patch = ["fix/", "[fix]"] | ||
minor = ["feature/", "[feature]"] | ||
major = ["release/", "[release]"] | ||
` | ||
|
||
// DefaultConfigFilePath the default relative filepath to the config file. | ||
DefaultConfigFilePath = ".semverbot.toml" | ||
|
||
// DefaultVersion the default version when no other version can be found. | ||
DefaultVersion = "0.0.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