Skip to content

Commit

Permalink
Merge pull request #37 from tenforwardconsulting/zb-webpack-support
Browse files Browse the repository at this point in the history
Support uploading packs dir if s3_packs_destination is set
  • Loading branch information
boatrite authored Jun 18, 2018
2 parents 2e9c0c2 + 59ec998 commit 328e551
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Changelog

This is a [changelog](https://keepachangelog.com/en/0.3.0/).

This project attempts to follow [semantic versioning](https://semver.org/)

## Unreleased

* breaking changes
* The `upload_assets_to_s3` task's `s3_destination` used to be of the form
`"s3://some-bucket-dev/assets"`. Now it is of the form
`"s3://some-bucket-dev"`. The task appends `"/assets"` for you. It does this
because if it detects webpack, it also appends `"/packs"` in order to upload
both assets and packs directories next to each other.

## Version - Date

* breaking changes
* enhancement A
* enhancement B

* deprecations
* deprecation A
* deprecation B

* bug fixes
* bug fix A
* bug fix B

* enhancements
* enhancement A
* enhancement B

* features
* feature A
* feature B
5 changes: 4 additions & 1 deletion lib/jefferies_tube/capistrano/s3_assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
within release_path do
appyml_text = capture :cat, "#{deploy_to}/shared/config/application.yml"
appyml = YAML.load appyml_text
execute "AWS_ACCESS_KEY_ID=#{appyml['AWS_ACCESS_KEY_ID']}", "AWS_SECRET_ACCESS_KEY=#{appyml["AWS_SECRET_ACCESS_KEY"]}", 'aws', 's3', 'sync', 'public/assets/', fetch(:s3_destination)
execute "AWS_ACCESS_KEY_ID=#{appyml['AWS_ACCESS_KEY_ID']}", "AWS_SECRET_ACCESS_KEY=#{appyml["AWS_SECRET_ACCESS_KEY"]}", 'aws', 's3', 'sync', 'public/assets/', "#{fetch(:s3_destination)}/assets"
if Dir.exists?('public/packs')
execute "AWS_ACCESS_KEY_ID=#{appyml['AWS_ACCESS_KEY_ID']}", "AWS_SECRET_ACCESS_KEY=#{appyml["AWS_SECRET_ACCESS_KEY"]}", 'aws', 's3', 'sync', 'public/packs/', "#{fetch(:s3_destination)}/packs"
end
end
end
end
Expand Down

0 comments on commit 328e551

Please sign in to comment.