Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change way how version is set from build #188

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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