From 2a8123210a2bce217dd4084b2e11c8617ddfb098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey=20Vilas?= Date: Tue, 8 Mar 2022 13:15:57 +0100 Subject: [PATCH] Analysis scripts: fix push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I am TIRED of fighting with this scripts and Github actions Signed-off-by: Álvaro Brey Vilas --- scripts/analysis/findbugs-up.rb | 2 +- scripts/analysis/lint-up.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/analysis/findbugs-up.rb b/scripts/analysis/findbugs-up.rb index 3bfde5f4e4..58a37bae28 100644 --- a/scripts/analysis/findbugs-up.rb +++ b/scripts/analysis/findbugs-up.rb @@ -118,7 +118,7 @@ system ('git add ' + PREVIOUS_FINDBUGS_RESULTS_FILE) system({"GIT_COMMITTER_EMAIL" => "drone@nextcloud.com", "GIT_AUTHOR_EMAIL" => "drone@nextcloud.com"}, 'git commit -sm "Drone: update FindBugs results to reflect reduced error/warning count [skip ci]"') # push to origin -system ('git push') +system ('git push origin HEAD:' + git_branch) # restore previous git user name and email system("git config --local user.name '#{previous_git_username}'") diff --git a/scripts/analysis/lint-up.rb b/scripts/analysis/lint-up.rb index 6bf76d1c43..361b0af064 100644 --- a/scripts/analysis/lint-up.rb +++ b/scripts/analysis/lint-up.rb @@ -187,7 +187,7 @@ system ('git add ' + PREVIOUS_LINT_RESULTS_FILE) system({"GIT_COMMITTER_EMAIL" => "drone@nextcloud.com", "GIT_AUTHOR_EMAIL" => "drone@nextcloud.com"}, 'git commit -sm "Drone: update Lint results to reflect reduced error/warning count [skip ci]"') # push to origin -system ('git push') +system ('git push origin HEAD:' + git_branch) puts "SUCCESS: count was reduced" exit 0 # success