version info
This commit is contained in:
parent
053a40de38
commit
c8ff616cf9
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -36,10 +36,13 @@ jobs:
|
||||
cat build/chkbit/warn-chkbit.txt
|
||||
cd dist; ls -l
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
./chkbit --version
|
||||
tar -czf chkbit-linux_amd64.tar.gz chkbit
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
./chkbit --version
|
||||
tar -czf chkbit-macos_amd64.tar.gz chkbit
|
||||
elif [ "$RUNNER_OS" == "Windows" ]; then
|
||||
chkbit.exe --version
|
||||
7z a -tzip chkbit-windows_amd64.zip chkbit.exe
|
||||
else
|
||||
echo 'unknown runner'
|
||||
|
@ -10,6 +10,8 @@ from datetime import datetime, timedelta
|
||||
from chkbit import Context, Status, IndexThread
|
||||
from . import CLI, Progress, RateCalc, sparkify
|
||||
|
||||
import importlib.metadata
|
||||
|
||||
|
||||
EPILOG = """
|
||||
.chkbitignore rules:
|
||||
@ -339,8 +341,16 @@ class Main:
|
||||
"-v", "--verbose", action="store_true", help="verbose output"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-V", "--version", action="store_true", help="show version information"
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.version:
|
||||
print(importlib.metadata.version("chkbit"))
|
||||
return
|
||||
|
||||
self.verbose = args.verbose or args.show_ignored_only
|
||||
if args.log_file:
|
||||
self.log_verbose = args.log_verbose
|
||||
|
Loading…
x
Reference in New Issue
Block a user