Last active
August 29, 2015 14:01
-
-
Save cosmo0920/f8d8591a3d705babf135 to your computer and use it in GitHub Desktop.
Jenkins build script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export TWITTER_USER=piyo | |
export CABAL_COMMAND="cabal install yesod yesod-bin" | |
export DATE="`date +\"%Y/%m/%d %H:%M:%S\"`" | |
echo "=== \"${CABAL_COMMAND}\" scheduled. at ${DATE} ===" | tw --user=${TWITTER_USER} --pipe | |
# check versions | |
uname -mprsv | |
ghc --version | |
cabal --version | |
# clean work dir cabal environment | |
if [ -d .cabal-sandbox ]; then | |
rm -rf ./.cabal-sandbox | |
fi | |
if [ -f cabal.sandbox.config ]; then | |
rm cabal.sandbox.config | |
fi | |
# install vanilla yesod | |
cabal update | |
cabal sandbox init | |
cabal install alex happy | |
cabal install yesod yesod-bin | |
if [ $? == 0 ]; then | |
echo "\"${CABAL_COMMAND}\"\nsuccess! at ${DATE}" | tw --user=${TWITTER_USER} --pipe | |
else | |
echo "\"${CABAL_COMMAND}\"\nfailure! at ${DATE}" | tw --user=${TWITTER_USER} --pipe | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install tw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment