mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
New version checker for software releases
Because os.rename() fails when renaming files across different filesystems. This issue can be easily triggered if we mount the "newver" file as a volume in Docker, and then run nvchecker. For example: $ docker run -v ./source.toml:/source.toml \ -v ./old.json:/old.json \ -v ./new.json:/new.json \ localhost/nvchecker -c /source.toml [I 04-23 13:47:18.537 core:408] mysource: updated from 1.0.0 to 1.0.1 taskName=Task-2 Traceback (most recent call last): File "/usr/bin/nvchecker", line 8, in <module> sys.exit(main()) ^^^^^^ File "/lib/python3.12/site-packages/nvchecker/__main__.py", line 96, in main core.write_verfile(newverf, vers) File "/lib/python3.12/site-packages/nvchecker/core.py", line 167, in write_verfile safe_overwrite(file, data) File "/lib/python3.12/site-packages/nvchecker/core.py", line 128, in safe_overwrite os.rename(tmpname, resolved_path) OSError: [Errno 16] Resource busy: '/new.json.tmp' -> '/new.json' |
||
---|---|---|
.github/workflows | ||
docs | ||
nvchecker | ||
nvchecker_source | ||
scripts | ||
tests | ||
.gitignore | ||
.readthedocs.yaml | ||
.typos.toml | ||
keyfile.toml.enc | ||
LICENSE | ||
mypy.ini | ||
pyproject.toml | ||
README.rst | ||
sample_config.toml | ||
setup.cfg | ||
tox.ini |
**nvchecker** (short for *new version checker*) is for checking if a new version of some software has been released. This is the version 2.0 branch. For the old version 1.x, please switch to the ``v1.x`` branch. .. image:: https://github.com/lilydjwg/nvchecker/workflows/run%20tests/badge.svg?branch=master :alt: Test Status :target: https://github.com/lilydjwg/nvchecker/actions?query=workflow%3A%22run+tests%22 .. image:: https://badge.fury.io/py/nvchecker.svg :alt: PyPI version :target: https://badge.fury.io/py/nvchecker .. image:: https://readthedocs.org/projects/nvchecker/badge/?version=latest :target: https://nvchecker.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status | .. image:: https://repology.org/badge/vertical-allrepos/nvchecker.svg :alt: Packaging status :target: https://repology.org/metapackage/nvchecker/versions .. contents:: :local: Dependency ---------- - Python 3.8+ - Python library: structlog, platformdirs, tomli (on Python < 3.11) - One of these Python library combinations (ordered by preference): * tornado + pycurl * aiohttp * httpx with http2 support (experimental; only latest version is supported) * tornado - All commands used in your software version configuration files Install and Run --------------- To install:: pip3 install nvchecker To use the latest code, you can also clone this repository and run:: pip install . To see available options:: nvchecker --help Run with one or more software version files:: nvchecker -c config_file You normally will like to specify some "version record files"; see below. Documentation ------------- For detailed documentation, see `https://nvchecker.readthedocs.io/en/latest/ <https://nvchecker.readthedocs.io/en/latest/>`_.