lib/deploy-context/context/deploy.rb in deploy-context-0.11.57.1.ga274362.1.g8977db8.2.g07fba0a vs lib/deploy-context/context/deploy.rb in deploy-context-0.11.57.1.ga274362.1.g8977db8.3.g30c6ab3

- old
+ new

@@ -29,7 +29,38 @@ end def cucumber(commands = []) chef_exec(['cucumber'] + commands) end + + def execute_action(context, action) + if action.nil? + context.cycle + else + case action + when 'once' + puts "\nExecute only once\n" + context.cycle + when 'always' + puts "\nAlways in execution\n" + while true do + context.cycle + end + when 'bump' + puts "\nBump minor version\n" + context.minor_bump + when 'release' + puts "\nBump major version\n" + context.major_bump + when 'test' + puts "\nExecute tests\n" + context.cucumber_test(deployer) + when 'reset' + puts "\nReset versionning\n" + # context.cucumber_test(deployer) + else + puts "Unknown setting #{action}" + end + end + end end end \ No newline at end of file