Created
October 31, 2014 13:35
-
-
Save dotcore/60bb2bf0cfd015871d0c to your computer and use it in GitHub Desktop.
appsuite pre-push hook
This file contains 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
#!/bin/sh | |
REV=`git rev-parse --verify HEAD` | |
BRANCH=`git rev-parse --symbolic --abbrev-ref HEAD` | |
SUBJECT=`git log -n 1 --pretty=format:"%s"` | |
BODY=`git log -n 1 --pretty=format:"%b"` | |
VERSION=`grep version ui/package.json | awk -F'"' '{print $4}'` | |
TEMPLATE="Title: ${SUBJECT}\nRoot cause:\nSolution: ${BODY}\nResolved state: Fix\nVersion: ${VERSION}\nGit commit: ${REV}\nGit repository: wd/frontend/web\nGit branch: ${BRANCH}\nPackage name: open-xchange-appsuite\n" | |
echo ${TEMPLATE} | pbcopy | |
echo ${TEMPLATE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment