diff --git a/bin/s3_website b/bin/s3_website index f6523a3c..3f8bb74c 100755 --- a/bin/s3_website +++ b/bin/s3_website @@ -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. @@ -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})" diff --git a/changelog.md b/changelog.md index f9d47a0c..85b96ea3 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/lib/s3_website/version.rb b/lib/s3_website/version.rb index 43ee5626..e09776c0 100644 --- a/lib/s3_website/version.rb +++ b/lib/s3_website/version.rb @@ -1,3 +1,3 @@ module S3Website - VERSION = '2.2.0' + VERSION = '2.3.0' end diff --git a/s3_website.gemspec b/s3_website.gemspec index 322de465..37a6a4a0 100644 --- a/s3_website.gemspec +++ b/s3_website.gemspec @@ -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'