Skip to content

Commit

Permalink
use date for test versions (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
viseshrp authored Apr 12, 2023
1 parent 12edd48 commit 805e851
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ ENV/
poetry.lock
.DS_Store
*.sqlite3
_version.py
workedon/_version.py
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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"
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os

from setuptools import find_packages, setup
import versioningit

REQUIREMENTS = [
"click>=8.1.1",
Expand All @@ -15,8 +14,6 @@
"platformdirs>=2.6.0",
]

SETUP_REQUIREMENTS = ["versioningit"]

curr_dir = os.path.abspath(os.path.dirname(__file__))


Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 805e851

Please sign in to comment.