diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce4666f..f6824b6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,14 +21,16 @@ test: rules: - when: always script: + - source init_env.sh - echo "Haha no tests yet" deploy: stage: deploy rules: # only run on MRs to main - - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" + - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" # run on commits to main - - if: $CI_COMMIT_BRANCH == "main" + - if: $CI_COMMIT_BRANCH == "master" script: + - source init_env.sh - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${PACKAGE_PROJECT_ID}/packages/pypi dist/* diff --git a/pyproject.toml b/pyproject.toml index 7470434..f5c434b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,9 @@ name = "rtl-manifest" # REQUIRED, is the only field that cannot be marked as dy # # For a discussion on single-sourcing the version, see # https://packaging.python.org/guides/single-sourcing-package-version/ -version = "0.0.2" # REQUIRED, although can be dynamic + +dynamic = ["version"] +# version = "0.0.3" # REQUIRED, although can be dynamic # This is a one-line description or tagline of what your project does. This # corresponds to the "Summary" metadata field: diff --git a/src/rtl_manifest/__init__.py b/src/rtl_manifest/__init__.py index 591d4e9..274ed5a 100644 --- a/src/rtl_manifest/__init__.py +++ b/src/rtl_manifest/__init__.py @@ -1,4 +1,9 @@ from .rtl_manifest import rtl_manifest_main +VERSION_BASE = "0.0.3" + +import datetime +__version__ = f"{VERSION_BASE}.{datetime.datetime.now().strftime('%Y.%m.%d.%H%M')}" + def main(): rtl_manifest_main() \ No newline at end of file