diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e8b6bdf..d48744c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -64,7 +64,7 @@ jobs: if-no-files-found: error - name: Publish package if: ${{ !env.ACT }} - uses: pypa/gh-action-pypi-publish@0bf742be3ebe032c25dd15117957dc15d0cfc38d + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3ffcc1..13f90fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -90,7 +90,7 @@ jobs: - name: Install run: make install - name: Publish package - uses: pypa/gh-action-pypi-publish@0bf742be3ebe032c25dd15117957dc15d0cfc38d + uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ skip-existing: true diff --git a/.gitignore b/.gitignore index 03bc075..f4cae4b 100644 --- a/.gitignore +++ b/.gitignore @@ -107,4 +107,4 @@ ENV/ poetry.lock .DS_Store *.sqlite3 -_version.py +workedon/_version.py diff --git a/pyproject.toml b/pyproject.toml index 69e8cb8..26663aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,6 @@ write = { file = "workedon/_version.py" } method = "smallest" [tool.versioningit.format] -distance = "{next_version}.dev{distance}" -dirty = "{base_version}.dev{distance}+dirty" -distance-dirty = "{next_version}.dev{distance}+dirty" \ No newline at end of file +distance = "{next_version}.dev{build_date:%Y%m%d%H%M%S}" +dirty = "{base_version}.dev{build_date:%Y%m%d%H%M%S}+dirty" +distance-dirty = "{next_version}.dev{build_date:%Y%m%d%H%M%S}+dirty" \ No newline at end of file diff --git a/setup.py b/setup.py index 2a1dc62..33d9ff5 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,6 @@ import os from setuptools import find_packages, setup -import versioningit REQUIREMENTS = [ "click>=8.1.1", @@ -15,8 +14,6 @@ "platformdirs>=2.6.0", ] -SETUP_REQUIREMENTS = ["versioningit"] - curr_dir = os.path.abspath(os.path.dirname(__file__)) @@ -32,10 +29,11 @@ def get_file_text(file_name): name = _init["__name__"] author = _init["__author__"] email = _init["__email__"] +version = _init["__version__"] setup( name=name, - version=versioningit.get_version(), + version=version, description="Work tracking from your shell.", long_description=get_file_text("README.md") + "\n\n" + get_file_text("CHANGELOG.md"), long_description_content_type="text/markdown", @@ -72,7 +70,6 @@ def get_file_text(file_name): python_requires=">=3.7", keywords="workedon work worklog log journal", install_requires=REQUIREMENTS, - setup_requires=SETUP_REQUIREMENTS, entry_points={ "console_scripts": [ "workedon=workedon.__main__:main",