Skip to content

Commit

Permalink
Merge pull request #39 from lldelisle/improve_autoupdate
Browse files Browse the repository at this point in the history
Improve autoupdate round 4
  • Loading branch information
nsoranzo authored Sep 30, 2024
2 parents 5339425 + 7e11d11 commit 410cb28
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,15 @@ jobs:
echo "Running autoupdate command..."
cd "$REPO"
# This may fail
# To get an exit code of 1 even with tee:
set -o pipefail
planemo autoupdate . --skiplist "${{ github.workspace }}/autoupdate/${{ matrix.upstream_repo_owner }}_${{ matrix.upstream_repo_name }}_skip_list" 2>&1 1> "${{ github.workspace }}/autoupdate.log" | tee "${{ github.workspace }}/autoupdate.err" || errors="${errors}\nCannot autoupdate $REPO, last line of stderr is\n$(tail -n 1 "${{ github.workspace }}/autoupdate.err")"
# Restore
set +o pipefail
# Waiting for https://github.com/galaxyproject/planemo/issues/1478 to be solved
if [[ "$(tail -n 1 "${{ github.workspace }}/autoupdate.log")" = "Could not update"* ]]; then
errors="${errors}\n$(tail -n 1 "${{ github.workspace }}/autoupdate.log")\n$(tail -n 1 "${{ github.workspace }}/autoupdate.err")"
fi
rm -f tool_test_output.* tools.yml
cd -
# Check if it changed something
Expand All @@ -109,7 +117,7 @@ jobs:
;;
*)
TITLE=$(python3 "${{ github.workspace }}/autoupdate/pr_text.py" --repo "$REPO" --log "${{ github.workspace }}/autoupdate.log" --shed "$REPO/.shed.yml" --out "${{ github.workspace }}/body.txt")
FILE_TO_CHECK=
FILE_TO_CHECK=${REPO}
;;
esac
# Check if there is a branch/PR that already exists
Expand Down Expand Up @@ -162,7 +170,7 @@ jobs:
fi
fi
echo "There are changes"
if [ "$PR_EXISTS" -eq 1 ]; then
if [ "$DIFF_BRANCH" = "origin/$REPO" ] ; then
# Check if the last commit of the existing branch was manual
LAST_AUTHOR=$(git log -1 --pretty=format:'%an' $DIFF_BRANCH)
if [ "$LAST_AUTHOR" != "planemo-autoupdate" ]; then
Expand Down

0 comments on commit 410cb28

Please sign in to comment.