- GIT_EXISTS =
{
"run_msg" => "Verifying you're running this recipe in the top level of a Git repository.",
"type" => InstructionTypes::DIRECTORY_EXISTS,
"command" => "./.git",
"error_msg" => "Error: This is not the top level of a git repository. Must exit.",
}
- GIT_ALL_CODE_COMMITTED =
{
"run_msg" => "Verifying that you have no uncommitted code in Git",
"type" => InstructionTypes::TERMINAL_COMMAND,
"command" => "git status",
"expected_result" => {
"type" => ResultTypes::DOES_NOT_CONTAIN_STRING,
"values" => ["Changes not staged for commit", "Changes to be committed"]
},
"error_msg" => "Error: You have unstaged files or uncommitted changes in Git. Please commit or stash everything so we can start on a clean slate.",
}
- GIT_COMMIT_RECIPE =
{
"run_msg" => "Committing changes made by #{Addons::Recipe::RECIPE_NAME_PLACEHOLDER} version: #{Addons::Recipe::RECIPE_VERSION_PLACEHOLDER} AddonList recipe",
"type" => InstructionTypes::TERMINAL_COMMAND,
"command" => "git add .; git commit -m \"ADDONS.IO RECIPE - #{Addons::Recipe::RECIPE_NAME_PLACEHOLDER} version: #{Addons::Recipe::RECIPE_VERSION_PLACEHOLDER}\"",
"expected_result" => {
"type" => ResultTypes::NO_EXPECTATION
},
"error_msg" => "Error: Git commit for this recipe failed.",
}
- GIT_RESET_HARD_HEAD =
{
"run_msg" => "There was an error, so we're undoing our changes. If you cannot fix this based on the error message, contact [email protected].",
"type" => InstructionTypes::TERMINAL_COMMAND,
"command" => "git add .; git reset --hard HEAD",
"expected_result" => {
"type" => ResultTypes::DOES_NOT_CONTAIN_STRING,
"values" => ["HEAD is now at"]
},
"error_msg" => "Error: we could not reset our work in Git. We hope we cleaned up this recipe, but can't be sure."
}