From 8e4164278002300c89d0ac9d5b26b32b736870ca Mon Sep 17 00:00:00 2001 From: "[BOT] pages deployer" Date: Fri, 25 Aug 2023 23:52:03 +0200 Subject: [PATCH] Fix: set git identity --- main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index 373aac9..656cfa8 100644 --- a/main.go +++ b/main.go @@ -65,10 +65,6 @@ func Exec(args Args) error { } } - if err := writeConfig(args); err != nil { - return err - } - if err := copyFiles(args); err != nil { return err } @@ -77,6 +73,10 @@ func Exec(args Args) error { return err } + if err := writeConfig(args); err != nil { + return err + } + if err := doCommit(args); err != nil { return err } @@ -122,11 +122,11 @@ func checkArgs(args *Args) error { } func writeConfig(args Args) error { - if err := repo.GlobalName("[BOT] pages deployer").Run(); err != nil { + if err := execute(exec.Command("git", "config", "user.name", "[BOT] pages deployer")); err != nil { return err } - if err := repo.GlobalUser("noreply@pages.bot").Run(); err != nil { + if err := execute(exec.Command("git", "config", "user.email", "noreply@pages.bot")); err != nil { return err }