version info
This commit is contained in:
parent
c8ff616cf9
commit
1d15326025
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@ -34,20 +34,24 @@ jobs:
|
|||||||
SITEPKG=$(pipenv run python -c "import site; print(site.getsitepackages()[-1])")
|
SITEPKG=$(pipenv run python -c "import site; print(site.getsitepackages()[-1])")
|
||||||
pipenv run pyinstaller run.py --hidden-import chkbit --hidden-import chkbit_cli --onefile --name chkbit --console --paths $SITEPKG
|
pipenv run pyinstaller run.py --hidden-import chkbit --hidden-import chkbit_cli --onefile --name chkbit --console --paths $SITEPKG
|
||||||
cat build/chkbit/warn-chkbit.txt
|
cat build/chkbit/warn-chkbit.txt
|
||||||
|
a=$(grep -oP '(?<=version = ")[^"]+' pyproject.toml)
|
||||||
|
b=$(grep -oP '(?<=__version__ = ")[^"]+' chkbit_cli/__init__.py)
|
||||||
|
if [[ $a != $b ]]; then echo "version error $a $b"; exit 1; fi
|
||||||
cd dist; ls -l
|
cd dist; ls -l
|
||||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||||
./chkbit --version
|
c=$(./chkbit --version)
|
||||||
tar -czf chkbit-linux_amd64.tar.gz chkbit
|
tar -czf chkbit-linux_amd64.tar.gz chkbit
|
||||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||||
./chkbit --version
|
c=$(./chkbit --version)
|
||||||
tar -czf chkbit-macos_amd64.tar.gz chkbit
|
tar -czf chkbit-macos_amd64.tar.gz chkbit
|
||||||
elif [ "$RUNNER_OS" == "Windows" ]; then
|
elif [ "$RUNNER_OS" == "Windows" ]; then
|
||||||
chkbit.exe --version
|
c=$(chkbit.exe --version)
|
||||||
7z a -tzip chkbit-windows_amd64.zip chkbit.exe
|
7z a -tzip chkbit-windows_amd64.zip chkbit.exe
|
||||||
else
|
else
|
||||||
echo 'unknown runner'
|
echo 'unknown runner'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [[ $a != $c ]]; then echo "version error $a $c"; exit 1; fi
|
||||||
|
|
||||||
- name: artifact
|
- name: artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
@ -2,3 +2,5 @@ from .cli import CLI
|
|||||||
from .progress import Progress
|
from .progress import Progress
|
||||||
from .sparklines import sparkify
|
from .sparklines import sparkify
|
||||||
from .rate_calc import RateCalc
|
from .rate_calc import RateCalc
|
||||||
|
|
||||||
|
__version__ = "4.2.1"
|
||||||
|
@ -8,9 +8,7 @@ import threading
|
|||||||
import time
|
import time
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from chkbit import Context, Status, IndexThread
|
from chkbit import Context, Status, IndexThread
|
||||||
from . import CLI, Progress, RateCalc, sparkify
|
from . import CLI, Progress, RateCalc, sparkify, __version__
|
||||||
|
|
||||||
import importlib.metadata
|
|
||||||
|
|
||||||
|
|
||||||
EPILOG = """
|
EPILOG = """
|
||||||
@ -348,7 +346,7 @@ class Main:
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.version:
|
if args.version:
|
||||||
print(importlib.metadata.version("chkbit"))
|
print(__version__)
|
||||||
return
|
return
|
||||||
|
|
||||||
self.verbose = args.verbose or args.show_ignored_only
|
self.verbose = args.verbose or args.show_ignored_only
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "chkbit"
|
name = "chkbit"
|
||||||
version = "4.2.0"
|
# because of packaging issues we keep this here and in chkbit_cli/__init__.py
|
||||||
|
version = "4.2.1"
|
||||||
description = "chkbit checks the data integrity of your files"
|
description = "chkbit checks the data integrity of your files"
|
||||||
authors = [
|
authors = [
|
||||||
{name = "Christian Zangl", email = "laktak@cdak.net"},
|
{name = "Christian Zangl", email = "laktak@cdak.net"},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user