Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"deploy.after_build" - stops/cancels out "after_build do" #20

Closed
paulmsmith opened this issue Apr 10, 2013 · 5 comments
Closed

"deploy.after_build" - stops/cancels out "after_build do" #20

paulmsmith opened this issue Apr 10, 2013 · 5 comments

Comments

@paulmsmith
Copy link

I was doing a HTMLBeautification after build with "after_build do" like so:

configure :build do
    after_build do
        system('htmlbeautifier build/*/*.html')
    end
end

but that never runs/fires if I have: deploy.after_build = true set for middleman-deploy. Sorry to throw a spanner in the works. I just thought I'd raise it as it might crop up for a few people.

cc: @tdreyno

@tvaughan
Copy link
Contributor

Ah, good find! I'll have a look. Thanks.

@tvaughan
Copy link
Contributor

Works for me. :(

@paulmsmith
Copy link
Author

Hmm.. I'll take another look. Are you using FTP deploy or Rsync? or would not that make a difference?

@tvaughan
Copy link
Contributor

I tried FTP and rsync. Both work. For example, please see: https://github.com/tvaughan/tvaughan.github.com/commit/8174022ea94bf409ce77c18b12b52e999553a70f [1]

$ middleman build
   identical  build/images/middleman.png
   identical  build/images/background.png
   identical  build/images/background.png
   identical  build/images/middleman.png
   identical  build/javascripts/all.js
   identical  build/stylesheets/all.css
   identical  build/stylesheets/normalize.css
   identical  build/index.html
## Deploying via ftp to tvaughan@ftp.example.com:/srv/www/site
Copied stylesheets/normalize.css
Copied stylesheets/all.css
Copied index.html
Copied javascripts/all.js
Copied images/middleman.png
Copied images/background.png
Wed Apr 24 08:15:25 CLST 2013

[1] ftp.example.com points to a test vm. I set the hostname in /etc/hosts. That's a valid setup.

@tvaughan
Copy link
Contributor

I removed deploy from the after_build hook in the latest release (v0.1.0). I added it simply because I could but that workflow doesn't make any sense, not all builds are meant to be deployed. Let me know if this causes you any grief.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants