Skip to content

Commit 0ca5403

Browse files
better commit messages
1 parent 5a26e91 commit 0ca5403

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/build.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ jobs:
3636
git merge main
3737
3838
- name: Fetch
39-
run: python fetch.py
39+
id: fetch
40+
run: |
41+
python fetch.py | tee fetched_thru.txt
42+
echo "THROUGH=$(cat fetched_thru.txt)" >> "$GITHUB_ENV"
4043
env:
4144
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4245
continue-on-error: true
@@ -46,5 +49,5 @@ jobs:
4649
git add all-commits/ releases/
4750
# swallow git "nothing added to commit" error; we might have
4851
# a merge commit which we want to push.
49-
git commit -m "add binaries" || echo "no new binaries" 1>&2
52+
git commit -m "add binaries ${{ env.THROUGH }}" || echo "no new binaries" 1>&2
5053
git push

fetch.py

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def URL(uri):
8282

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

8687
changes += 1
8788

@@ -102,8 +103,12 @@ def URL(uri):
102103
with open(target_path, "wb") as f:
103104
f.write(r.content)
104105
print(f"{filename} fetched to {target_path}", file=sys.stderr)
106+
latest_target = output_dir
107+
105108
changes += 1
106109

107110
if changes == 0:
108111
print("No files fetched.", file=sys.stderr)
109112
sys.exit(1)
113+
114+
sys.stdout.write(f"through {latest_target}")

0 commit comments

Comments
 (0)