Skip to content

Commit 394235a

Browse files
committed
ci: add dev release workflow and update dependency import handling in build script
1 parent 952be83 commit 394235a

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/dev-release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,23 @@ jobs:
4040
id: version
4141
run: |
4242
$ver = python -c "from src.common import app_version; print(app_version)"
43+
$ver = "$ver-dev.${{ github.run_number }}"
4344
echo "app_version=$ver" >> $env:GITHUB_OUTPUT
4445
46+
4547
- name: Velopack Pack
4648
run: |
4749
& "$HOME\.dotnet\tools\vpk.exe" pack --packId Hammer5Tools --packVersion ${{ steps.version.outputs.app_version }} --packDir Hammer5Tools --mainExe Hammer5Tools.exe --icon src/appicon.ico --channel dev
4850
4951
5052
53+
- name: Delete old dev release
54+
run: gh release delete dev --yes --cleanup-tag
55+
env:
56+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
continue-on-error: true
58+
5159
- name: Velopack Upload
60+
5261
run: |
5362
& "$HOME\.dotnet\tools\vpk.exe" upload github --repoUrl https://github.com/dertwist/Hammer5Tools --publish --token ${{ secrets.GITHUB_TOKEN }} --channel dev --tag dev

makefile.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,12 @@ def _generate_pycparser_tables():
8989
predictable regardless of whether the package dir is writable.
9090
"""
9191
try:
92-
import pycparser
93-
import pycparser.ply.lex as lex
94-
import pycparser.ply.yacc as yacc
92+
try:
93+
import pycparser.ply.lex as lex
94+
import pycparser.ply.yacc as yacc
95+
except ImportError:
96+
import ply.lex as lex
97+
import ply.yacc as yacc
9598
# Monkey-patch outputdir so tables land in cur_dir
9699
_orig_lex = lex.lex
97100
_orig_yacc = yacc.yacc

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ clr_loader
3131
cffi
3232
vdf
3333
pycparser
34+
ply
3435
Pillow
36+
3537
matplotlib
3638
pynvml
3739
GPUtil

0 commit comments

Comments
 (0)