Skip to content

Commit

Permalink
infra: fix file download location and script pwd
Browse files Browse the repository at this point in the history
  • Loading branch information
nrmancuso authored and romani committed Apr 17, 2023
1 parent 986b3ff commit 673e86a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .ci/diff-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source ./.ci/util.sh

case $1 in

# Downloads all files necessary to generate regression report.
# Downloads all files necessary to generate regression report to the parent directory.
download-files)
checkForVariable "GITHUB_TOKEN"
echo "Downloading files..."
Expand All @@ -17,27 +17,27 @@ download-files)
curl --fail-with-body -X GET "${LINK}" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token $GITHUB_TOKEN" \
-o project.properties
-o ../project.properties

if [ -n "$NEW_MODULE_CONFIG_LINK" ]; then
curl --fail-with-body -X GET "${NEW_MODULE_CONFIG_LINK}" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token $GITHUB_TOKEN" \
-o new_module_config.xml
-o ../new_module_config.xml
fi

if [ -n "$DIFF_CONFIG_LINK" ]; then
curl --fail-with-body -X GET "${DIFF_CONFIG_LINK}" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token $GITHUB_TOKEN" \
-o diff_config.xml
-o ../diff_config.xml
fi

if [ -n "$PATCH_CONFIG_LINK" ]; then
curl --fail-with-body -X GET "${PATCH_CONFIG_LINK}" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token $GITHUB_TOKEN" \
-o patch_config.xml
-o ../patch_config.xml
fi
;;

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/diff-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ jobs:
LINK_FROM_PR: ${{ needs.parse_body.outputs.projects_link }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd checkstyle
./.ci/diff-report.sh download-files
cd ../
# set main checkstyle repo as an upstream
# Diff report will be generated taking upstream's master branch as a base branch
Expand Down

0 comments on commit 673e86a

Please sign in to comment.