Rakefile in cfer-0.2.0 vs Rakefile in cfer-0.3.0
- old
+ new
@@ -1,17 +1,15 @@
#require "bundler/gem_tasks"
gem 'cfer'
require 'cfer'
require 'highline'
-Cfer::LOGGER.level = Logger::DEBUG
-
task :default => [:spec]
task :config_aws, [:profile] do |t, args|
- Aws.config.update region: ENV['AWS_REGION'] || 'us-east-1',
- credentials: Aws::SharedCredentials.new(profile_name: ENV['AWS_PROFILE'] || 'default')
+ Aws.config.update region: ENV['AWS_REGION'] || ask('AWS Region?') { |q| q.default = 'us-east-1' },
+ credentials: Aws::SharedCredentials.new(profile_name: ENV['AWS_PROFILE'] || ask('AWS Profile?') { |q| q.default = 'default' })
end
task :vpc => :config_aws do |t, args|
Cfer.converge! 'vpc',
template: 'examples/vpc.rb',
@@ -20,11 +18,11 @@
task :describe_vpc => :config_aws do
Cfer.describe! 'vpc'
end
-task :instance => :config_aws do |t, args|
+task :instance => :vpc do |t, args|
key_pair = ask("Enter your EC2 KeyPair name: ")
Cfer.converge! 'instance',
template: 'examples/instance.rb',
parameters: {
@@ -46,12 +44,13 @@
# This task isn't really part of Cfer.
# It just makes it easier for me to release new versions.
task :release do
+ `git checkout master`
+ `git merge develop --no-ff -m 'Merge from develop for release'`
+
require_relative 'lib/cfer/version.rb'
- `git checkout master`
- `git merge develop --no-ff -m 'Merge from develop for release v#{Cfer::VERSION}'`
`git tag -m "Release v#{Cfer::VERSION}" #{Cfer::VERSION}`
end