3 Commits

Author SHA1 Message Date
dependabot[bot]
2bcac8ba51 Bump pytest from 4.3.1 to 9.0.3 in /src/tests
Bumps [pytest](https://github.com/pytest-dev/pytest) from 4.3.1 to 9.0.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/4.3.1...9.0.3)

---
updated-dependencies:
- dependency-name: pytest
  dependency-version: 9.0.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 17:00:55 +00:00
einarf
e6ca4aa9ca Add rtd config file 2024-01-05 04:13:20 +01:00
einarf
093dab93ca Make rcb dump env vars to properly escape them 2024-01-05 03:50:13 +01:00
6 changed files with 40 additions and 4 deletions

24
.readthedocs.yaml Normal file
View File

@@ -0,0 +1,24 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub
python:
install:
- requirements: docs/requirements.txt

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Dump all env vars so we can source them in cron jobs
printenv | sed 's/^\(.*\)$/export \1/g' > /env.sh
rcb dump-env > /env.sh
# Write crontab
rcb crontab > crontab

View File

@@ -1 +1 @@
__version__ = '0.6.0'
__version__ = '0.7.1'

View File

@@ -51,6 +51,9 @@ def main():
elif args.action == "crontab":
crontab(config)
elif args.action == "dump-env":
dump_env()
# Random test stuff here
elif args.action == "test":
nodes = utils.get_swarm_nodes()
@@ -290,6 +293,14 @@ def crontab(config):
print(cron.generate_crontab(config))
def dump_env():
"""Dump all environment variables to a script that can be sourced from cron"""
print("#!/bin/bash")
print("# This file was generated by restic-compose-backup")
for key, value in os.environ.items():
print("export {}='{}'".format(key, value))
def parse_args():
parser = argparse.ArgumentParser(prog='restic_compose_backup')
parser.add_argument(
@@ -303,6 +314,7 @@ def parse_args():
'cleanup',
'version',
'crontab',
'dump-env',
'test',
],
)

View File

@@ -3,7 +3,7 @@ from setuptools import setup, find_namespace_packages
setup(
name="restic-compose-backup",
url="https://github.com/ZettaIO/restic-compose-backup",
version="0.7.0",
version="0.7.1",
author="Einar Forselv",
author_email="eforselv@gmail.com",
packages=find_namespace_packages(include=[

View File

@@ -1,2 +1,2 @@
pytest==4.3.1
pytest==9.0.3
tox