CI tests and publishing #10

Merged
mxmehl merged 3 commits from ci-test into main 2024-01-16 16:54:04 +01:00
3 changed files with 12 additions and 1 deletions
Showing only changes of commit 4250475933 - Show all commits

View File

@@ -24,7 +24,9 @@ jobs:
- name: Install package - name: Install package
run: pip3 install dist/seafile_mirror-*.tar.gz run: pip3 install dist/seafile_mirror-*.tar.gz
- name: Run package - name: Run package
run: seafile-mirror --help run: |
seafile-mirror --version
seafile-mirror --help
# Run tool and sync a test library # Run tool and sync a test library
test-sync: test-sync:

View File

@@ -1,3 +1,10 @@
# SPDX-FileCopyrightText: 2023 Max Mehl <https://mehl.mx> # SPDX-FileCopyrightText: 2023 Max Mehl <https://mehl.mx>
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
"""Global init file"""
from importlib.metadata import version
__version__ = version("seafile-mirror")

View File

@@ -14,6 +14,7 @@ from time import sleep
import yaml import yaml
from . import __version__
from ._cachedb import db_read from ._cachedb import db_read
from ._helpers import convert_bytes, findstring, get_lock from ._helpers import convert_bytes, findstring, get_lock
from ._seafile import ( from ._seafile import (
@@ -48,6 +49,7 @@ parser.add_argument(
default=False, default=False,
help="Print and log DEBUG messages", help="Print and log DEBUG messages",
) )
parser.add_argument("--version", action="version", version="%(prog)s " + __version__)
def main(): # pylint: disable=too-many-locals, too-many-statements def main(): # pylint: disable=too-many-locals, too-many-statements