Created
January 17, 2012 20:23
Gerrit trivial rebase detector hook
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
#!/bin/bash | |
# hook downloaded from: https://www.codeaurora.org/xwiki/bin/QAEP/Gerrit | |
#patchset-created --change <change id> --change-url <change url> --project <project name> --branch <branch> --uploader <uploader> --commit <sha1> --patchset <patchset id> | |
# $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 | |
echo "patchset created `date`" >> patchset-created.log | |
echo "pwd `pwd`" >> patchset-created.log | |
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
#Usage: trivial_rebase.py <required options> [--server-port=PORT] | |
# | |
#Options: | |
# -h, --help show this help message and exit | |
# --change=CHANGEID Change identifier | |
# --project=PROJECT Project path in Gerrit | |
# --commit=COMMIT Git commit-ish for this patchset | |
# --patchset=PATCHSET The patchset number | |
# --private-key-path=PRIVATE_KEY_PATH | |
# Full path to Gerrit SSH daemon's private host key | |
# --server-port=PORT Port to connect to Gerrit's SSH daemon [default: | |
# 29418] | |
echo "site path is $site_path" >> patchset-created.log | |
echo $0 >> patchset-created.log | |
echo "./trivial_rebase.py --change=${2} --project=${6} --commit=${12} --patchset=${14} --private-key-path /media/storage/gerrit/etc/ssh_host_dsa_key" >> patchset-created.log | |
echo >> patchset-created.log | |
$DIR/trivial_rebase.py --change=${2} --project=${6} --commit=${12} --patchset=${14} --private-key=/media/storage/gerrit/etc/ssh_host_dsa_key 2> error.log >> output.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment