Skip to content

Commit

Permalink
chore: change way how version is set from build
Browse files Browse the repository at this point in the history
  • Loading branch information
longstone committed Nov 29, 2024
1 parent a064a4a commit 1c38ae8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
1 change: 0 additions & 1 deletion .VERSION

This file was deleted.

9 changes: 3 additions & 6 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:

steps:
- uses: actions/checkout@master
- name: Update version file ⬆️
- name: Update version in setup.py ⬆️
uses: brettdorrans/[email protected]
with:
filename: '.VERSION'
placeholder: '${VERSION}'
filename: 'setup.py'
placeholder: '1.0.0.dev1'

- name: Set up Python 3.12
uses: actions/setup-python@v5
Expand All @@ -35,9 +35,6 @@ jobs:
build
--sdist
--outdir dist/ .
- name: Ensure .VERSION file is included
run: cp .VERSION dist/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Update version file ⬆️
- name: Update version in setup.py ⬆️
uses: brettdorrans/[email protected]
with:
filename: '.VERSION'
placeholder: '${VERSION}'
filename: 'setup.py'
placeholder: '1.0.0.dev1'

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ This will run the job every 3 hours (at a random minute) and writing the output

Release works via the GitHub [Draft a new Release](https://github.com/jaroslawhartman/withings-sync/releases/new)
function.
The `version` key in `setup.py` will be bumped automatically (Version will be written to .VERSION file).
Keep in mind to update the `.VERSION` if a major release is done.
The `version` key in `setup.py` will be bumped automatically (Version will be written to setup.py file).

### Docker Image

Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def read(fname):

setup(
name="withings-sync",
version=read(".VERSION"),
version="1.0.0.dev1",
author="Masayuki Hamasaki, Steffen Vogel",
author_email="[email protected]",
description="A tool for synchronisation of Withings (ex. Nokia Health Body) to Garmin Connect and Trainer Road.",
Expand All @@ -26,7 +26,11 @@ def read(fname):
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
],
install_requires=["lxml", "requests", "garth>=0.4.32", "python-dotenv"],
install_requires=[
"lxml==5.2.2",
"requests==2.31.0",
"garth==0.4.46",
"python-dotenv"],
entry_points={
"console_scripts": ["withings-sync=withings_sync.sync:main"],
},
Expand Down

0 comments on commit 1c38ae8

Please sign in to comment.