Skip to content

Instantly share code, notes, and snippets.

@dotcore
Created October 31, 2014 13:35
Show Gist options
  • Save dotcore/60bb2bf0cfd015871d0c to your computer and use it in GitHub Desktop.
Save dotcore/60bb2bf0cfd015871d0c to your computer and use it in GitHub Desktop.
appsuite pre-push hook
#!/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