Skip to content

Commit

Permalink
better commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed May 20, 2023
1 parent 5a26e91 commit 0ca5403
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ jobs:
git merge main
- name: Fetch
run: python fetch.py
id: fetch
run: |
python fetch.py | tee fetched_thru.txt
echo "THROUGH=$(cat fetched_thru.txt)" >> "$GITHUB_ENV"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
Expand All @@ -46,5 +49,5 @@ jobs:
git add all-commits/ releases/
# swallow git "nothing added to commit" error; we might have
# a merge commit which we want to push.
git commit -m "add binaries" || echo "no new binaries" 1>&2
git commit -m "add binaries ${{ env.THROUGH }}" || echo "no new binaries" 1>&2
git push
5 changes: 5 additions & 0 deletions fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def URL(uri):

os.rename(tmp_directory, output_directory)
print(f"successfully fetched {output_directory}", file=sys.stderr)
latest_target = output_directory

changes += 1

Expand All @@ -102,8 +103,12 @@ def URL(uri):
with open(target_path, "wb") as f:
f.write(r.content)
print(f"{filename} fetched to {target_path}", file=sys.stderr)
latest_target = output_dir

changes += 1

if changes == 0:
print("No files fetched.", file=sys.stderr)
sys.exit(1)

sys.stdout.write(f"through {latest_target}")

0 comments on commit 0ca5403

Please sign in to comment.