From 1c38ae8d29d94ee482d7ee8231cff43387d7ace7 Mon Sep 17 00:00:00 2001 From: longstone <3483450-longstone@users.noreply.gitlab.com> Date: Fri, 29 Nov 2024 16:20:49 +0100 Subject: [PATCH] chore: change way how version is set from build --- .VERSION | 1 - .github/workflows/build-publish.yml | 9 +++------ .github/workflows/docker-image.yml | 6 +++--- README.md | 3 +-- setup.py | 8 ++++++-- 5 files changed, 13 insertions(+), 14 deletions(-) delete mode 100644 .VERSION diff --git a/.VERSION b/.VERSION deleted file mode 100644 index 4640e9f..0000000 --- a/.VERSION +++ /dev/null @@ -1 +0,0 @@ -${VERSION} diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 9425231..53e937c 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -11,11 +11,11 @@ jobs: steps: - uses: actions/checkout@master - - name: Update version file ⬆️ + - name: Update version in setup.py ⬆️ uses: brettdorrans/write-version-to-file@v1.1.0 with: - filename: '.VERSION' - placeholder: '${VERSION}' + filename: 'setup.py' + placeholder: '1.0.0.dev1' - name: Set up Python 3.12 uses: actions/setup-python@v5 @@ -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') diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index dea5da5..344ea5b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -30,11 +30,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Update version file ⬆️ + - name: Update version in setup.py ⬆️ uses: brettdorrans/write-version-to-file@v1.1.0 with: - filename: '.VERSION' - placeholder: '${VERSION}' + filename: 'setup.py' + placeholder: '1.0.0.dev1' - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/README.md b/README.md index 8fa5db2..a6418ae 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/setup.py b/setup.py index c5d8bff..9bc3338 100644 --- a/setup.py +++ b/setup.py @@ -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="post@steffenvogel.de", description="A tool for synchronisation of Withings (ex. Nokia Health Body) to Garmin Connect and Trainer Road.", @@ -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"], },