Skip to content

Commit ec3e6e3

Browse files
committed
update: debug creation.
1 parent f0d9509 commit ec3e6e3

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,36 @@ jobs:
2323
- run: python3 craft.py
2424

2525
- run: |
26-
chmod +x ./gitcmd.sh
27-
./gitcmd.sh
26+
cd $GITHUB_WORKSPACE
27+
ls -al
28+
git tag -l
29+
30+
LATEST_TAG=`git tag --sort=refname |tail -n 2 |head -n 1`
31+
echo "LATEST_TAG: $LATEST_TAG"
32+
NEW_TAG=`git tag --sort=refname |tail -n 1`
33+
echo "NEW_TAG: $NEW_TAG"
34+
35+
git log --format='%(trailers:key=Type,valueonly,separator=%x20)%x1c%s [%(trailers:key=Issue,valueonly,separator=,)]' $LATEST_TAG..$NEW_TAG | awk -F "\034" '{
36+
gsub(/\[\]$/, "", $2);
37+
if (length($1) == 0) $1="";
38+
if (!($1 in item_count)) item_count[$1]=0;
39+
items[$1, item_count[$1]]=$2;
40+
item_count[$1]++;
41+
}
42+
END {
43+
for (k in item_count) {
44+
print k;
45+
k2=k;
46+
gsub(/./, "-", k2);
47+
print k2
48+
for (i=0; i<item_count[k]; i++) print "- "items[k, i];
49+
print ""
50+
}
51+
}' > commit_notes
52+
cat commit_notes
53+
2854
echo "Begin Creating Release..."
29-
python3 ./releaser.py > version.txt
55+
python3 ./releaser.py commit_notes > version.txt
3056
echo "Create successful!"
3157
cat version.txt
3258

gitcmd.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ git log --format='%(trailers:key=Type,valueonly,separator=%x20)%x1c%s [%(trailer
1919
for (i=0; i<item_count[k]; i++) print "- "items[k, i];
2020
print ""
2121
}
22-
}'
22+
}' > commit_notes

releaser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@
2929
"""
3030

3131
import os
32+
import sys
3233

3334
def main():
3435
verify_output = os.popen("python3 ./verify.py ./creathackenv.sh").read()
35-
update_logs = os.popen("bash ./gitcmd.sh").read()
36+
with open(sys.argv[1], "r") as f:
37+
log = f.read()
38+
update_logs = log
3639
print(template.replace("__VERIFY_OUTPUT__", verify_output).replace("__UPDATE_LOGS__", update_logs))
3740
pass
3841

0 commit comments

Comments
 (0)