Add support for routines; state messages
This commit is contained in:
@@ -33,6 +33,13 @@ class CheckoutState extends AbstractGitState {
|
||||
}
|
||||
}
|
||||
|
||||
failure_message() {
|
||||
return `The Git repo at "${this._config.path}" on host "${this._host.name}" is not checked out to the correct ref (${this._config.target}).`
|
||||
}
|
||||
|
||||
check_message() {
|
||||
return this.failure_message()
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exports = CheckoutState
|
||||
|
||||
@@ -21,6 +21,13 @@ class CloneState extends AbstractGitState {
|
||||
}
|
||||
}
|
||||
|
||||
failure_message() {
|
||||
return `Could not find the cloned Git repo at "${this._config.path}" on host "${this._host.name}."`
|
||||
}
|
||||
|
||||
check_message() {
|
||||
return this.failure_message()
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exports = CloneState
|
||||
|
||||
@@ -26,6 +26,13 @@ class TagState extends AbstractGitState {
|
||||
}
|
||||
}
|
||||
|
||||
failure_message() {
|
||||
return `The tag "${this._config.tag}" does not exist in the Git repo "${this._config.path}" on host "${this._host.name}."`
|
||||
}
|
||||
|
||||
check_message() {
|
||||
return this.failure_message()
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exports = TagState
|
||||
|
||||
Reference in New Issue
Block a user