From 6ed4833851c4fe6ad3c27f6ded264965bf1af2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Nicol=C3=A1s?= Date: Mon, 23 May 2022 19:38:24 +0200 Subject: [PATCH] fix: another possible fix for git push on release --- src/fullparse.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/fullparse.sh b/src/fullparse.sh index d2446f5..ec51b40 100644 --- a/src/fullparse.sh +++ b/src/fullparse.sh @@ -70,7 +70,7 @@ then if [ "$(ls -A ./$contents_folder/temp_results)" ] then - if [ $release == 'true'] && [ "$(ls -A ./$contents_folder/results)" ] + if [ $release == 'true' ] && [ "$(ls -A ./$contents_folder/results)" ] then rsync -a $contents_folder/results/ $contents_folder/archives/ rm -rf $contents_folder/results/* @@ -79,13 +79,20 @@ then mv -v $contents_folder/temp_results/* $contents_folder/results/ git config user.name github-actions git config user.email github-actions@github.com - git add $contents_folder/ - git commit -m "Ontology metrics calculated - OQuaRE" if [ $release == 'true' ] then - git push origin HEAD:master + git branch temp_branch + git checkout temp_branch + git add $contents_folder/ + git commit -m "Ontology metrics calculated - OQuaRE" + git checkout master + git merge temp_branch + git push origin master + else + git add $contents_folder/ + git commit -m "Ontology metrics calculated - OQuaRE" + git push fi - git push fi fi \ No newline at end of file