Skip to content

Commit

Permalink
chore(ci): avoid hardcoded distribution name
Browse files Browse the repository at this point in the history
  • Loading branch information
git-developer committed Oct 6, 2024
1 parent 532f2e6 commit 1b028c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 50
fetch-depth: 0
- uses: rlespinasse/github-slug-action@v4

- name: Setup qemu for docker
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ RUN <<EOR
. .env/bin/activate
pip install libusb1 pytest toml vdf
python -m pytest tests
pip install --prefix "${TARGET}/usr" dist/*.whl
pip install --prefix "${TARGET}/usr" --no-warn-script-location dist/*.whl

# Save version
PYTHONPATH=$(find "${TARGET}" -type d -name site-packages) \
python -c "from scc.constants import DAEMON_VERSION; print('VERSION=' + DAEMON_VERSION)" >>/build/.build-metadata.env

# Fix shebangs of scripts from '#!/work/.env/bin/python'
Expand Down
4 changes: 2 additions & 2 deletions scc/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
# THE SOFTWARE.

from enum import IntEnum
from importlib.metadata import version
from importlib.metadata import version, distribution

"""
If SC-Controller is updated while daemon is running, DAEMON_VERSION send by
daemon will differ one one expected by UI and daemon will be forcefully restarted.
"""
DAEMON_VERSION = version("sccontroller")
DAEMON_VERSION = version(distribution(__package__).name)

HPERIOD = 0.02
LPERIOD = 0.5
Expand Down

0 comments on commit 1b028c1

Please sign in to comment.