Skip to content

Instantly share code, notes, and snippets.

@yaasita
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaasita/092262f54a230eb97d85 to your computer and use it in GitHub Desktop.
Save yaasita/092262f54a230eb97d85 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
#rbenv
HOME=/home/hogeuser
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
cd ~/middleman
function build_middleman {
bundle exec middleman build > /dev/null
cd build/
git add --all
git commit -m update
git push -f
}
pull_line=`git pull | wc -l`
if [ "$pull_line" -gt "1" ]; then
echo "build start"
build_middleman
else
echo "no change"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment