Use environment variable for git author in tests
This way it doesn't have to be repeated every time.
This commit is contained in:
parent
02396b2a1b
commit
4a56d518c9
|
@ -6,6 +6,8 @@ co=$2
|
||||||
|
|
||||||
export GIT_CONFIG_GLOBAL=/dev/null
|
export GIT_CONFIG_GLOBAL=/dev/null
|
||||||
export GIT_CONFIG_NOSYSTEM=1
|
export GIT_CONFIG_NOSYSTEM=1
|
||||||
|
export GIT_AUTHOR_NAME="GrahamCOfBorg"
|
||||||
|
export GIT_AUTHOR_EMAIL="graham+cofborg@example.com"
|
||||||
|
|
||||||
makepr() {
|
makepr() {
|
||||||
git init --bare "$bare"
|
git init --bare "$bare"
|
||||||
|
@ -13,13 +15,13 @@ makepr() {
|
||||||
|
|
||||||
cp -r maintainers/* "$co/"
|
cp -r maintainers/* "$co/"
|
||||||
git -C "$co" add .
|
git -C "$co" add .
|
||||||
git -C "$co" commit --author "GrahamCOfBorg <graham+cofborg@example.com>" -m "initial repo commit"
|
git -C "$co" commit -m "initial repo commit"
|
||||||
git -C "$co" push origin master
|
git -C "$co" push origin master
|
||||||
|
|
||||||
cp maintainers-pr/* "$co/"
|
cp maintainers-pr/* "$co/"
|
||||||
git -C "$co" checkout -b my-cool-pr
|
git -C "$co" checkout -b my-cool-pr
|
||||||
git -C "$co" add .
|
git -C "$co" add .
|
||||||
git -C "$co" commit --author "GrahamCOfBorg <graham+cofborg@example.com>" -m "check out this cool PR"
|
git -C "$co" commit -m "check out this cool PR"
|
||||||
git -C "$co" push origin my-cool-pr:refs/pull/1/head
|
git -C "$co" push origin my-cool-pr:refs/pull/1/head
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@ co=$2
|
||||||
|
|
||||||
export GIT_CONFIG_GLOBAL=/dev/null
|
export GIT_CONFIG_GLOBAL=/dev/null
|
||||||
export GIT_CONFIG_NOSYSTEM=1
|
export GIT_CONFIG_NOSYSTEM=1
|
||||||
|
export GIT_AUTHOR_NAME="GrahamCOfBorg"
|
||||||
|
export GIT_AUTHOR_EMAIL="graham+cofborg@example.com"
|
||||||
|
|
||||||
makepr() {
|
makepr() {
|
||||||
git init --bare "$bare"
|
git init --bare "$bare"
|
||||||
|
@ -13,13 +15,13 @@ makepr() {
|
||||||
|
|
||||||
cp build/* "$co/"
|
cp build/* "$co/"
|
||||||
git -C "$co" add .
|
git -C "$co" add .
|
||||||
git -C "$co" commit --author "GrahamCOfBorg <graham+cofborg@example.com>" -m "initial repo commit"
|
git -C "$co" commit -m "initial repo commit"
|
||||||
git -C "$co" push origin master
|
git -C "$co" push origin master
|
||||||
|
|
||||||
cp build-pr/* "$co/"
|
cp build-pr/* "$co/"
|
||||||
git -C "$co" checkout -b my-cool-pr
|
git -C "$co" checkout -b my-cool-pr
|
||||||
git -C "$co" add .
|
git -C "$co" add .
|
||||||
git -C "$co" commit --author "GrahamCOfBorg <graham+cofborg@example.com>" -m "check out this cool PR"
|
git -C "$co" commit -m "check out this cool PR"
|
||||||
git -C "$co" push origin my-cool-pr:refs/pull/1/head
|
git -C "$co" push origin my-cool-pr:refs/pull/1/head
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue