mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-10-10 12:20:58 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2cbc5aa6fa | ||
|
ffa2dfc119 | ||
|
cfc92b2284 | ||
|
216202dec7 |
@@ -22,8 +22,7 @@ copyright = '2019, Zetta.IO Technology AS'
|
|||||||
author = 'Zetta.IO Technology AS'
|
author = 'Zetta.IO Technology AS'
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = '0.3.0'
|
release = '0.3.2'
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
- Update version in `setup.py`
|
- Update version in `setup.py`
|
||||||
- Update version in `docs/conf.py`
|
- Update version in `docs/conf.py`
|
||||||
|
- Update version in `restic_compose_backup/__init__.py`
|
||||||
- Build and tag image
|
- Build and tag image
|
||||||
- push: `docker push zettaio/restic-compose-backup:<version>`
|
- push: `docker push zettaio/restic-compose-backup:<version>`
|
||||||
- Ensure RTD has new docs published
|
- Ensure RTD has new docs published
|
||||||
@@ -12,9 +13,9 @@ When releasing a bugfix version we need to update the
|
|||||||
main image as well.
|
main image as well.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build . --tag zettaio/restic-compose-backup:0.3
|
docker build src --tag zettaio/restic-compose-backup:0.3
|
||||||
docker build . --tag zettaio/restic-compose-backup:0.3.1
|
docker build src --tag zettaio/restic-compose-backup:0.3.2
|
||||||
|
|
||||||
docker push zettaio/restic-compose-backup:0.3
|
docker push zettaio/restic-compose-backup:0.3
|
||||||
docker push zettaio/restic-compose-backup:0.3.1
|
docker push zettaio/restic-compose-backup:0.3.2
|
||||||
```
|
```
|
||||||
|
1
src/restic_compose_backup/__init__.py
Normal file
1
src/restic_compose_backup/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
__version__ = '0.3.2'
|
@@ -35,7 +35,13 @@ def run(image: str = None, command: str = None, volumes: dict = None,
|
|||||||
line = ""
|
line = ""
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
line += next(stream).decode()
|
# TODO: figure out why..
|
||||||
|
# Apparently the stream can be bytes or strings.
|
||||||
|
data = next(stream)
|
||||||
|
if isinstance(data, bytes):
|
||||||
|
line += data.decode()
|
||||||
|
elif isinstance(data, str):
|
||||||
|
line += data
|
||||||
if line.endswith('\n'):
|
if line.endswith('\n'):
|
||||||
break
|
break
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
|
@@ -42,6 +42,10 @@ def main():
|
|||||||
elif args.action == 'alert':
|
elif args.action == 'alert':
|
||||||
alert(config, containers)
|
alert(config, containers)
|
||||||
|
|
||||||
|
elif args.action == 'version':
|
||||||
|
import restic_compose_backup
|
||||||
|
print(restic_compose_backup.__version__)
|
||||||
|
|
||||||
|
|
||||||
def status(config, containers):
|
def status(config, containers):
|
||||||
"""Outputs the backup config for the compose setup"""
|
"""Outputs the backup config for the compose setup"""
|
||||||
@@ -205,7 +209,7 @@ def parse_args():
|
|||||||
parser = argparse.ArgumentParser(prog='restic_compose_backup')
|
parser = argparse.ArgumentParser(prog='restic_compose_backup')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'action',
|
'action',
|
||||||
choices=['status', 'snapshots', 'backup', 'start-backup-process', 'alert', 'cleanup'],
|
choices=['status', 'snapshots', 'backup', 'start-backup-process', 'alert', 'cleanup', 'version'],
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--log-level',
|
'--log-level',
|
||||||
|
@@ -3,7 +3,7 @@ from setuptools import setup, find_namespace_packages
|
|||||||
setup(
|
setup(
|
||||||
name="restic-compose-backup",
|
name="restic-compose-backup",
|
||||||
url="https://github.com/ZettaIO/restic-compose-backup",
|
url="https://github.com/ZettaIO/restic-compose-backup",
|
||||||
version="0.3.0",
|
version="0.3.2",
|
||||||
author="Einar Forselv",
|
author="Einar Forselv",
|
||||||
author_email="eforselv@gmail.com",
|
author_email="eforselv@gmail.com",
|
||||||
packages=find_namespace_packages(include=['restic_compose_backup']),
|
packages=find_namespace_packages(include=['restic_compose_backup']),
|
||||||
|
Reference in New Issue
Block a user