CI fixes with Ubuntu 24.04 #25
@@ -12,8 +12,10 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
- name: Add pipx to PATH
|
||||||
|
run: echo "/root/.local/bin" >> ${GITHUB_PATH}
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: pip install poetry
|
run: pipx install poetry
|
||||||
- name: Install poetry package
|
- name: Install poetry package
|
||||||
run: poetry install --no-interaction ${{ inputs.poetry_install_args }}
|
run: poetry install --no-interaction ${{ inputs.poetry_install_args }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -14,11 +14,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
# Test building the package and installing it via pip3
|
# Test building the package and installing it via pip3
|
||||||
test-build-install:
|
test-build-install:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Add pipx to PATH
|
||||||
|
run: echo "/root/.local/bin" >> ${GITHUB_PATH}
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: pip install poetry
|
run: pipx install poetry
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: poetry build
|
run: poetry build
|
||||||
- name: Install package
|
- name: Install package
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ from ._seafile import (
|
|||||||
|
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
parser.add_argument("-c", "--configdir", required=True, help="The config directory")
|
parser.add_argument("-c", "--configdir", required=True, help="The config directory")
|
||||||
|
parser.add_argument(
|
||||||
|
"-l",
|
||||||
|
"--logfile",
|
||||||
|
help="The path to the logfile. Default: <configdir>/seafile_mirror.log",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-d",
|
"-d",
|
||||||
"--dry",
|
"--dry",
|
||||||
@@ -52,14 +57,17 @@ parser.add_argument(
|
|||||||
parser.add_argument("--version", action="version", version="%(prog)s " + __version__)
|
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, too-many-branches
|
||||||
"""Main function"""
|
"""Main function"""
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
# Set files depending on configdir
|
# Set files depending on configdir
|
||||||
configdir = args.configdir.rstrip("/") + "/"
|
configdir = args.configdir.rstrip("/") + "/"
|
||||||
configfile = configdir + "seafile_mirror.conf.yaml"
|
configfile = configdir + "seafile_mirror.conf.yaml"
|
||||||
cachefile = configdir + ".seafile_mirror.db.json"
|
cachefile = configdir + ".seafile_mirror.db.json"
|
||||||
logfile = configdir + "seafile_mirror.log"
|
if args.logfile:
|
||||||
|
logfile = args.logfile
|
||||||
|
else:
|
||||||
|
logfile = configdir + "seafile_mirror.log"
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log = logging.getLogger()
|
log = logging.getLogger()
|
||||||
|
|||||||
Reference in New Issue
Block a user