cleanup make-pr.sh and fix set -e usage
This commit is contained in:
parent
6b8268d691
commit
59279e227d
|
@ -4,31 +4,21 @@ set -eu
|
|||
bare=$1
|
||||
co=$2
|
||||
|
||||
(
|
||||
makepr() {
|
||||
git init --bare "$bare"
|
||||
git clone "$bare" "$co"
|
||||
|
||||
cp build/* "$co/"
|
||||
git -C "$co" add .
|
||||
git -C "$co" commit --no-gpg-sign --author "GrahamCOfBorg <graham+cofborg@example.com>" -m "initial repo commit"
|
||||
git -C "$co" push origin master
|
||||
|
||||
(
|
||||
cp build/* "$co/"
|
||||
cd "$co/"
|
||||
git add .
|
||||
git commit --no-gpg-sign --author "GrahamCOfBorg <graham+cofborg@example.com>" -m "initial repo commit"
|
||||
git push origin master
|
||||
)
|
||||
cp build-pr/* "$co/"
|
||||
git -C "$co" checkout -b my-cool-pr
|
||||
git -C "$co" add .
|
||||
git -C "$co" commit --no-gpg-sign --author "GrahamCOfBorg <graham+cofborg@example.com>" -m "check out this cool PR"
|
||||
git -C "$co" push origin my-cool-pr:refs/pull/1/head
|
||||
}
|
||||
|
||||
(
|
||||
cp build-pr/* "$co/"
|
||||
cd "$co/"
|
||||
git checkout -b my-cool-pr
|
||||
git add .
|
||||
git commit --no-gpg-sign --author "GrahamCOfBorg <graham+cofborg@example.com>" -m "check out this cool PR"
|
||||
git push origin my-cool-pr:refs/pull/1/head
|
||||
|
||||
)
|
||||
) >&2
|
||||
|
||||
(
|
||||
cd "$co/"
|
||||
git rev-parse HEAD
|
||||
)
|
||||
makepr >&2
|
||||
git -C "$co" rev-parse HEAD
|
||||
|
|
Loading…
Reference in a new issue