middleman-s3_sync
middleman-s3_sync copied to clipboard
javasripts & stylesheets folder is not being synced
Hi Fred,
thanks or answering that fast via twitter. Here is the requested issue with as much details as I can give, hopefully :)
Basically everything from the build folder gets synced to the bucket expect the builde/javascripts
& build/stylesheets
folder. build/images
and the content is synced completely.
I checked the folder rights/permissions, but to me everything looks fine.
drwxr-xr-x 3 user staff 102 25 Mai 18:16 search
drwxr-xr-x 3 user staff 102 20 Jun 20:22 javascripts
drwxr-xr-x 15 user staff 510 20 Jun 20:22 images
drwxr-xr-x 13 user staff 442 26 Jun 20:16 ..
drwxr-xr-x 3 user staff 102 26 Jun 20:35 stylesheets
-rw-r--r-- 1 user staff 2875 27 Jun 09:43 index.html
drwxr-xr-x 6 user staff 204 27 Jun 09:43 agf-dcr
drwxr-xr-x 8 user staff 272 27 Jun 09:43 .
Gemfile
# If you do not have OpenSSL installed, change
# the following line to use 'http://'
source 'https://rubygems.org'
# For faster file watcher updates on Windows:
gem 'wdm', '~> 0.1.0', platforms: [:mswin, :mingw]
gem 'rake'
# Windows does not come with time zone data
gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby]
gem 'redcarpet'
gem 'sass-material-colors'
# Middleman Gems
gem 'middleman', '>= 4.0.0'
gem 'middleman-autoprefixer'
gem 'middleman-search'
gem 'middleman-minify-html'
gem 'middleman-syntax'
gem 'middleman-sprockets', '~> 4.0.0.rc.1'
gem 'middleman-compass', '>= 4.0.0'
gem 'middleman-deploy', github: 'middleman-contrib/middleman-deploy', branch: 'master'
gem 'mime-types'
gem 'middleman-s3_sync'
Build directive
configure :build do
activate :minify_css
activate :minify_javascript
activate :asset_hash
activate :minify_html
end
s3_sync options
activate :s3_sync do |s3_sync|
s3_sync.bucket = '[filled out]'
s3_sync.region = 'eu-central-1'
s3_sync.delete = false
s3_sync.after_build = true
s3_sync.prefer_gzip = true
end
Set folders
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'
set :relative_links, true
would be great if you could help, i really like the idea of syncing only the needed stuff.
Thanks in advance -Jan
Could you provide the output of the sync command? I am curious to see what it thinks it needs to do.
Currently, s3_sync only synchronizes the files that it sees through the Middleman sitemap. This appears to be causing issues when the files are generated outside of it. I'll see what middleman-sprockets
and middleman-compass
do. I suspect that they might be working outside of the internal sitemap.
Hi sure,
yes here is the output
Deploying to production
TARGET=production bundle exec middleman build
identical build/stylesheets/main-6890e269.css
identical build/images/nielsen_logo_small-eb348db9.png
identical build/images/nielsen_woman_1-23c5ce5f.png
identical build/images/device_tablet-3535ea4a.png
identical build/images/device_desktop-8e6d7f4a.png
identical build/images/device_mobile-be95a2bd.png
identical build/images/favicon.ico
identical build/images/svod-white-icon-90710cdc.png
identical build/images/intro_objects-8e36b7e7.png
identical build/images/arrow-down-7a5f3dfa.png
identical build/images/nielsen_man_1-2b3a4d79.png
identical build/images/smartphone-tablet-white-icon-4076bcda.png
identical build/images/television-white-icon-bf54b205.png
identical build/images/Ohne Titel.afdesign
identical build/search/lunr-index.json
identical build/agf-dcr/metadata-comparison.html
identical build/index.html
updated build/agf-dcr/integration-guide-android.html
identical build/agf-dcr/integration-guide-javascript.html
identical build/agf-dcr/integration-guide-ios.html
identical build/javascripts/all-733f1d33.js
s3_sync Let's see if there's work to be done...
Processing sitemap |Time: 00:00:00 | ========================================================================================================== | Time: 00:00:00
Processing remote files |Time: 00:00:00 | ===================================================================================================== | Time: 00:00:00
s3_sync Ready to apply updates to guides.nielsen.com.
s3_sync Creating agf-dcr/integration-guide-ios.html
s3_sync Creating agf-dcr/integration-guide-javascript.html
s3_sync Creating agf-dcr/integration-guide-android.html
s3_sync Creating agf-dcr/metadata-comparison.html
s3_sync Creating images/favicon.ico
s3_sync Creating images/Ohne Titel.afdesign
s3_sync Creating index.html
s3_sync Creating search/lunr-index.json
Project built successfully.
done
What do you see when you run a middleman s3_sync with the -v flag? This will show the decision whether to update on every file rather than just the ones that are created or updated. Having a link to the site, the repo or the bucket would help.
On Mon, Jun 27, 2016 at 7:56 AM Jan Wiemers [email protected] wrote:
Hi sure,
yes here is the output
Deploying to production TARGET=production bundle exec middleman build identical build/stylesheets/main-6890e269.css identical build/images/nielsen_logo_small-eb348db9.png identical build/images/nielsen_woman_1-23c5ce5f.png identical build/images/device_tablet-3535ea4a.png identical build/images/device_desktop-8e6d7f4a.png identical build/images/device_mobile-be95a2bd.png identical build/images/favicon.ico identical build/images/svod-white-icon-90710cdc.png identical build/images/intro_objects-8e36b7e7.png identical build/images/arrow-down-7a5f3dfa.png identical build/images/nielsen_man_1-2b3a4d79.png identical build/images/smartphone-tablet-white-icon-4076bcda.png identical build/images/television-white-icon-bf54b205.png identical build/images/Ohne Titel.afdesign identical build/search/lunr-index.json identical build/agf-dcr/metadata-comparison.html identical build/index.html updated build/agf-dcr/integration-guide-android.html identical build/agf-dcr/integration-guide-javascript.html identical build/agf-dcr/integration-guide-ios.html identical build/javascripts/all-733f1d33.js s3_sync Let's see if there's work to be done... Processing sitemap |Time: 00:00:00 | ========================================================================================================== | Time: 00:00:00 Processing remote files |Time: 00:00:00 | ===================================================================================================== | Time: 00:00:00 s3_sync Ready to apply updates to guides.nielsen.com. s3_sync Creating agf-dcr/integration-guide-ios.html s3_sync Creating agf-dcr/integration-guide-javascript.html s3_sync Creating agf-dcr/integration-guide-android.html s3_sync Creating agf-dcr/metadata-comparison.html s3_sync Creating images/favicon.ico s3_sync Creating images/Ohne Titel.afdesign s3_sync Creating index.html s3_sync Creating search/lunr-index.json Project built successfully. done
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/fredjean/middleman-s3_sync/issues/128#issuecomment-228752791, or mute the thread https://github.com/notifications/unsubscribe/AACFJ3D1zhpF76qt4xwfA0QFxgY9AxQfks5qP9apgaJpZM4I-15O .
Fred Jean ([email protected])
here is the output
== Activating: file_watcher
== Activating: front_matter
== Activating: data
== Activating: inline_url_rewriter
== Activating: sitemap_ondisk
== Activating: sitemap_import
== Activating: sitemap_endpoint
== Activating: sitemap_proxies
== Activating: sitemap_redirects
== Activating: sitemap_move_files
== Activating: sitemap_ignore
== Activating: external_helpers
== Activating: erb_renderer
== Activating: coffee_renderer
== Activating: haml_renderer
== Activating: sass_renderer
== Activating: markdown_renderer
== Failed Activation `liquid_renderer` : cannot load such file -- liquid
== Failed Activation `slim_renderer` : cannot load such file -- slim
== Failed Activation `less_renderer` : cannot load such file -- less
== Failed Activation `stylus_renderer` : cannot load such file -- stylus
== Activating: default_helpers
== Activating: lorem
== Activating: routing
== Activating: collections
== Activating: compass
== Change (#<Set: {:source}>): agf-dcr/integration-guide-android.html.markdown
== Change (#<Set: {:source}>): agf-dcr/integration-guide-ios.html.markdown
== Change (#<Set: {:source}>): agf-dcr/integration-guide-javascript.html.markdown
== Change (#<Set: {:source}>): agf-dcr/metadata-comparison.html.markdown
== Change (#<Set: {:source}>): images/arrow-down.png
== Change (#<Set: {:source}>): images/device_desktop.png
== Change (#<Set: {:source}>): images/device_mobile.png
== Change (#<Set: {:source}>): images/device_tablet.png
== Change (#<Set: {:source}>): images/favicon.ico
== Change (#<Set: {:source}>): images/intro_objects.png
== Change (#<Set: {:source}>): images/nielsen_logo_small.png
== Change (#<Set: {:source}>): images/nielsen_man_1.png
== Change (#<Set: {:source}>): images/nielsen_woman_1.png
== Change (#<Set: {:source}>): images/Ohne Titel.afdesign
== Change (#<Set: {:source}>): images/smartphone-tablet-white-icon.png
== Change (#<Set: {:source}>): images/svod-white-icon.png
== Change (#<Set: {:source}>): images/television-white-icon.png
== Change (#<Set: {:source}>): index.html.markdown
== Change (#<Set: {:source, :no_frontmatter}>): javascripts/_jquery-2.2.4.js
== Change (#<Set: {:source}>): javascripts/all.js.erb
== Change (#<Set: {:source}>): layouts/documentation.erb
== Change (#<Set: {:source}>): layouts/landingpage.erb
== Change (#<Set: {:source, :no_frontmatter}>): partials/_site_footer.html.erb
== Change (#<Set: {:source, :no_frontmatter}>): partials/_site_header.html.erb
== Change (#<Set: {:source, :no_frontmatter}>): partials/_site_navigation.html.erb
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_config.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_github-markdown.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_helper.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_landingpage.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_media-queries.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_normalize.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_site-footer.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_site-header.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_site-main.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_site-navigation.scss
== Change (#<Set: {:source}>): stylesheets/main.css.scss.erb
== Rebuilding resource list
== Reading: Local config: config.rb
== Activating: autoprefixer
== Activating: sprockets
== Activating: syntax
== Requesting resource list rebuilding: first_run_change_page
== Activating: search
== Activating: s3_sync
Loaded extensions:
== Extension: file_watcher
== Extension: front_matter
== Extension: data
== Extension: inline_url_rewriter
== Extension: sitemap_ondisk
== Extension: sitemap_import
== Extension: sitemap_endpoint
== Extension: sitemap_proxies
== Extension: sitemap_redirects
== Extension: sitemap_move_files
== Extension: sitemap_ignore
== Extension: external_helpers
== Extension: erb_renderer
== Extension: coffee_renderer
== Extension: haml_renderer
== Extension: sass_renderer
== Extension: markdown_renderer
== Extension: default_helpers
== Extension: lorem
== Extension: routing
== Extension: collections
== Extension: compass
== Extension: autoprefixer
== Extension: sprockets
== Extension: syntax
== Extension: search
== Extension: s3_sync
== Change (#<Set: {:source}>): agf-dcr/integration-guide-android.html.markdown
== Change (#<Set: {:source}>): agf-dcr/integration-guide-ios.html.markdown
== Change (#<Set: {:source}>): agf-dcr/integration-guide-javascript.html.markdown
== Change (#<Set: {:source}>): agf-dcr/metadata-comparison.html.markdown
== Change (#<Set: {:source}>): images/arrow-down.png
== Change (#<Set: {:source}>): images/device_desktop.png
== Change (#<Set: {:source}>): images/device_mobile.png
== Change (#<Set: {:source}>): images/device_tablet.png
== Change (#<Set: {:source}>): images/favicon.ico
== Change (#<Set: {:source}>): images/intro_objects.png
== Change (#<Set: {:source}>): images/nielsen_logo_small.png
== Change (#<Set: {:source}>): images/nielsen_man_1.png
== Change (#<Set: {:source}>): images/nielsen_woman_1.png
== Change (#<Set: {:source}>): images/Ohne Titel.afdesign
== Change (#<Set: {:source}>): images/smartphone-tablet-white-icon.png
== Change (#<Set: {:source}>): images/svod-white-icon.png
== Change (#<Set: {:source}>): images/television-white-icon.png
== Change (#<Set: {:source}>): index.html.markdown
== Change (#<Set: {:source, :no_frontmatter}>): javascripts/_jquery-2.2.4.js
== Change (#<Set: {:source}>): javascripts/all.js.erb
== Change (#<Set: {:source}>): layouts/documentation.erb
== Change (#<Set: {:source}>): layouts/landingpage.erb
== Change (#<Set: {:source, :no_frontmatter}>): partials/_site_footer.html.erb
== Change (#<Set: {:source, :no_frontmatter}>): partials/_site_header.html.erb
== Change (#<Set: {:source, :no_frontmatter}>): partials/_site_navigation.html.erb
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_config.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_github-markdown.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_helper.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_landingpage.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_media-queries.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_normalize.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_site-footer.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_site-header.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_site-main.scss
== Change (#<Set: {:source, :no_frontmatter}>): stylesheets/_site-navigation.scss
== Change (#<Set: {:source}>): stylesheets/main.css.scss.erb
== Rebuilding resource list
== Requesting resource list rebuilding: touched_file
== Requesting resource list rebuilding: registered_new_manipulator_front_matter
== Requesting resource list rebuilding: registered_new_manipulator_sitemap_ondisk
== Requesting resource list rebuilding: registered_new_manipulator_sitemap_import
== Requesting resource list rebuilding: registered_new_manipulator_sitemap_endpoint
== Requesting resource list rebuilding: registered_new_manipulator_sitemap_proxies
== Requesting resource list rebuilding: registered_new_manipulator_sitemap_redirects
== Requesting resource list rebuilding: registered_new_manipulator_sitemap_move_files
== Requesting resource list rebuilding: registered_new_manipulator_sitemap_ignore
== Requesting resource list rebuilding: registered_new_manipulator_routing
== Requesting resource list rebuilding: registered_new_manipulator_routing
== Requesting resource list rebuilding: registered_new_manipulator_collections
== Requesting resource list rebuilding: registered_new_manipulator_sprockets
== Requesting resource list rebuilding: registered_new_manipulator_search
== Requesting resource list rebuilding: registered_new_manipulator_s3_sync
== Rebuilding resource list
== Running manipulator: sitemap_ondisk (0)
== Running manipulator: sitemap_endpoint (0)
== Running manipulator: sitemap_proxies (0)
== Running manipulator: sitemap_redirects (0)
== Running manipulator: sitemap_ignore (0)
== Running manipulator: sitemap_import (1)
== Running manipulator: routing (10)
== Running manipulator: front_matter (20)
== Running manipulator: sprockets (50)
== Instrument (sprockets.asset_lookup): 108.998ms
{:asset=>#<Middleman::Sprockets::Resource path=javascripts/all.js>}
== Instrument (sprockets.asset_lookup): 295.317ms
{:asset=>#<Middleman::Sprockets::Resource path=stylesheets/main.css>}
== Instrument (sprockets): 404.822ms
{:name=>"manipulator.ignore_resources"}
== Instrument (sitemap.manipulator): 411.91499999999996ms
{:name=>:sprockets}
== Running manipulator: search (50)
== Running manipulator: sitemap_move_files (101)
== Running manipulator: collections (110)
== Running manipulator: routing (130)
== Running manipulator: s3_sync (9999)
== Instrument (sitemap.update): 429.47400000000005ms
{:reasons=>[:touched_file, :registered_new_manipulator_front_matter, :registered_new_manipulator_sitemap_ondisk, :registered_new_manipulator_sitemap_import, :registered_new_manipulator_sitemap_endpoint, :registered_new_manipulator_sitemap_proxies, :registered_new_manipulator_sitemap_redirects, :registered_new_manipulator_sitemap_move_files, :registered_new_manipulator_sitemap_ignore, :registered_new_manipulator_routing, :registered_new_manipulator_collections, :registered_new_manipulator_sprockets, :registered_new_manipulator_search, :registered_new_manipulator_s3_sync]}
s3_sync Let's see if there's work to be done...
Processing sitemap |Time: 00:00:01 | ============================================================================================================= | Time: 00:00:01
Processing remote files |Time: 00:00:00 | ======================================================================================================== | Time: 00:00:00
s3_sync All S3 files are up to date.
Hey Fred,
just got rid of this issue, but w/o finding the root cause :( I updated from ruby-2.2.2 to ruby 2.3.1 after that everything works quite fine. Maybe there is an issue with this special version of ruby.
Thanks for your help! If you want we can nail it down together, I hate such situations :)
But this issue could be closed I think, whats your thought on that?
Best Jan
I'm glad this is working, but I'm with you. It would have been good to find the root cause.
On Tue, Jun 28, 2016 at 4:27 AM Jan Wiemers [email protected] wrote:
Hey Fred,
just got rid of this issue, but w/o finding the root cause :( I updated from ruby-2.2.2 to ruby 2.3.1 after that everything works quite fine. Maybe there is an issue with this special version of ruby.
Thanks for your help! If you want we can nail it down together, I hate such situations :)
But this issue could be closed I think, whats your thought on that?
Best Jan
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/fredjean/middleman-s3_sync/issues/128#issuecomment-229011588, or mute the thread https://github.com/notifications/unsubscribe/AACFJ1LD79ql52tZ3ye_VHk4j9axa8Zzks5qQPb2gaJpZM4I-15O .
Fred Jean ([email protected])
Hi Fred,
just nailed down the root cause.
this happens when you have activate :asset_hash
in a case statement like I have in my build statement.
When you take this out and always activate it, it works like a charm.
Hope that helps to fix the issue.
best Jan