Skip to content

Commit

Permalink
Support --headless when running cfg apply
Browse files Browse the repository at this point in the history
  • Loading branch information
laurilehmijoki committed Aug 8, 2014
1 parent ea7bae6 commit 7ca4512
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
14 changes: 13 additions & 1 deletion bin/s3_website
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ class Cfg < Thor
exit 1
end

option(
:headless,
:type => :boolean,
:desc => "Apply the settings headlessly. See --autocreate-cloudfront-distribution for more info."
)
option(
'autocreate-cloudfront-dist',
:type => :boolean,
:desc => "When used with --headless, automatically create a CloudFront distribution for your S3 website."
)
desc 'apply', 'Apply the configuration on the AWS services'
long_desc <<-LONGDESC
`s3_website cfg apply` will apply the configuration the S3 bucket.
Expand All @@ -37,7 +47,9 @@ class Cfg < Thor
require 'configure-s3-website'
config_source = ConfigureS3Website::FileConfigSource.new 's3_website.yml'
ConfigureS3Website::Runner.run({
:config_source => config_source
:config_source => config_source,
:headless => options[:headless],
'autocreate-cloudfront-dist' => options['autocreate-cloudfront-dist']
})
rescue Exception => error
puts "#{error.message} (#{error.class})"
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This project uses [Semantic Versioning](http://semver.org).

## 2.3.0

* The command `s3_website cfg apply` now supports `--headless` and
`--autocreate-cloudfront-dist`

## 2.2.0

* Specify the location of the website in the *s3_website.yml* file
Expand Down
2 changes: 1 addition & 1 deletion lib/s3_website/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module S3Website
VERSION = '2.2.0'
VERSION = '2.3.0'
end
2 changes: 1 addition & 1 deletion s3_website.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.default_executable = %q{s3_website}

s.add_dependency 'thor', '= 0.18.1'
s.add_dependency 'configure-s3-website', '= 1.5.5'
s.add_dependency 'configure-s3-website', '= 1.6.0'
s.add_dependency 'colored', '1.2'
s.add_dependency 'dotenv', '~> 0.11.1'

Expand Down

0 comments on commit 7ca4512

Please sign in to comment.