File: __init__.py

package info (click to toggle)
python-sievelib 1.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 388 kB
  • sloc: python: 3,677; makefile: 7
file content (16 lines) | stat: -rw-r--r-- 473 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os


def local_scheme(version):
    return ""


def get_version():
    from setuptools_scm import get_version as default_version

    github_version = os.environ.get("GITHUB_REF_NAME", None)
    github_type = os.environ.get("GITHUB_REF_TYPE", None)
    if github_version is not None and github_type == "tag":
        print(f"GITHUB_REF_NAME found, using version: {github_version}")
        return github_version
    return default_version(local_scheme=local_scheme)