harcode git author in all commands
This makes it easier to locally test the commands without affecting ~/.gitconfig
This commit is contained in:
parent
36100bcb75
commit
bfbeb67ff1
4 changed files with 12 additions and 9 deletions
|
|
@ -1,5 +0,0 @@
|
|||
# only source this file
|
||||
# ==================================================
|
||||
|
||||
git config --global user.name "Nur a bot"
|
||||
git config --global user.email "joerg.nur-bot@thalheim.io"
|
||||
|
|
@ -5,7 +5,6 @@ set -eu -o pipefail # Exit with nonzero exit code if anything fails
|
|||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
|
||||
source ${DIR}/lib/setup-git.sh
|
||||
set -x
|
||||
|
||||
|
||||
|
|
@ -26,7 +25,7 @@ nix run '(import ./release.nix {})' -c nur index nur-combined > nur-search/data/
|
|||
cd nur-search
|
||||
if [[ ! -z "$(git diff --exit-code)" ]]; then
|
||||
git add ./data/packages.json
|
||||
git commit -m "automatic update package.json"
|
||||
git commit --author "Nur a bot <joerg.nur-bot@thalheim.io>" -m "automatic update package.json"
|
||||
git pull --rebase origin master
|
||||
git push origin master
|
||||
nix-shell --run "make clean && make && make publish"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ if [[ -z "$(git diff --exit-code)" ]]; then
|
|||
echo "No changes to the output on this push; exiting."
|
||||
else
|
||||
git add --all repos.json*
|
||||
git commit -m "automatic update"
|
||||
git commit --author "Nur a bot <joerg.nur-bot@thalheim.io>" -m "automatic update"
|
||||
# in case we are getting overtaken by a different job
|
||||
git pull --rebase origin master
|
||||
git push "https://$API_TOKEN_GITHUB@github.com/nix-community/NUR" HEAD:master
|
||||
|
|
|
|||
|
|
@ -42,7 +42,16 @@ def commit_files(files: List[str], message: str) -> None:
|
|||
cmd.extend(files)
|
||||
subprocess.check_call(cmd)
|
||||
if repo_changed():
|
||||
subprocess.check_call(["git", "commit", "-m", message])
|
||||
subprocess.check_call(
|
||||
[
|
||||
"git",
|
||||
"commit",
|
||||
"--author",
|
||||
"Nur a bot <joerg.nur-bot@thalheim.io>",
|
||||
"-m",
|
||||
message,
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def commit_repo(repo: Repo, message: str, path: Path) -> Repo:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue