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

logfile on server? #242

Closed
j6s opened this issue Oct 17, 2014 · 1 comment
Closed

logfile on server? #242

j6s opened this issue Oct 17, 2014 · 1 comment

Comments

@j6s
Copy link

j6s commented Oct 17, 2014

Hello. I would like to write a deploy log to my server, to see who deploy what and when.

I am not shure if there are variables defined for the stuff i would need for it, thats why I am asking. The variables I would need are: name (username or git name), current git hash, (current git commit message).

I would like to do something like this:

queu "echo '[$(date)] #{hash} (#{message}) deployed by #{username}' > #{deploy_to}/deploy.log"

This might be a very special usecase, but I would appreciate your help.

btw, Thanks for the value mina is giving us. We are using it for about 3 months now and are probably about 1k-2k deploys in. So much time saved. Thanks guys

@d4be4st
Copy link
Member

d4be4st commented Jan 22, 2015

Hi @thephpjo sorry for the long response, i do not know if you figured it out how to do this but here is an example:

desc "latest commit"
task :latest_commit => :environment do
  queue  %[cd #{deploy_to}/scm]
  queue  %[echo "[$(date)] $(git log -1 --pretty=%h) ($(git log -1 --pretty=%B)) deployed by $(git log -1 --pretty=%cn)"  > #{deploy_to}/deploy.log]
end

@d4be4st d4be4st closed this as completed Jul 5, 2015
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