Skip to content

Commit

Permalink
Fix to CI for commit of regenerated packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mario4tier committed Dec 18, 2024
1 parent 78de099 commit 28b461f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/dev-nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,16 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
if [ -n "$(git status --porcelain dist/)" ]; then
echo "Changes detected in dist directory"
dist_changes=$(git status --porcelain dist/)
ta_common_changes=$(git status --porcelain include/ta_common.h)
if [ -n "$dist_changes" ] || [ -n "$ta_common_changes" ]; then
echo "Changes detected by git status:"
if [ -n "$dist_changes" ]; then
echo "$dist_changes"
fi
if [ -n "$ta_common_changes" ]; then
echo "$ta_common_changes"
fi
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add dist/
Expand All @@ -102,7 +110,7 @@ jobs:
# Retry mechanism for handling concurrent pushes
for i in {1..5}; do
git pull --rebase origin dev && git push origin dev && break || sleep 10
git pull --rebase --strategy-option=ours origin dev && git push origin dev && break || sleep 10
done
else
echo "No changes detected in dist directory"
Expand Down
2 changes: 1 addition & 1 deletion scripts/utilities/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def sync_sources_digest(root_dir: str) -> Tuple[bool,str]:
n_chars += len(utf8_line)
running_hash.update(normalized_line.encode('utf-8'))
n_lines += 1
print(f" Hash: {running_hash.hexdigest()}, File: {file_path}, Lines: {n_lines}, Opens: {n_opens}, Chars: {n_chars}")
# print(f" Hash: {running_hash.hexdigest()}, File: {file_path}, Lines: {n_lines}, Opens: {n_opens}, Chars: {n_chars}")
except Exception as e:
print(f"Error reading file while updating SOURCES-HASH [{file_path}]: {e}")
sys.exit(1)
Expand Down

0 comments on commit 28b461f

Please sign in to comment.