script to email git log as part of a dev deploy

This script makes sure the dev site is clean, emails a log summary of updates about to be applied, updates the site and emails me so I know what changed.

I'm using this on a dev site which is periodically updated to the latest master for testing.

#!/bin/bash

cd /var/www/site

git stash
git checkout master
git fetch
git log --oneline master..origin/master | mail -s "site updated " me@example.com
mit merge origin/master
./build.sh

Tags

Post new comment

Got something to add - just enter a comment
all other fields are optional.

Your email address will not be published.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options