move from active to all
This commit is contained in:
parent
3ec93d5b69
commit
2c1c0a7a79
@ -20,5 +20,6 @@ Additional options are available:
|
|||||||
- `trueupdate -h` for the CLI help page
|
- `trueupdate -h` for the CLI help page
|
||||||
- `trueupdate -s` or ` trueupdate --sync` to sync the catalogs before running auto-update
|
- `trueupdate -s` or ` trueupdate --sync` to sync the catalogs before running auto-update
|
||||||
- `trueupdate -p` or ` trueupdate --prune` to prune (remove) old docker images after running auto-update
|
- `trueupdate -p` or ` trueupdate --prune` to prune (remove) old docker images after running auto-update
|
||||||
|
- `trueupdate -a` or ` trueupdate --all` updates both active (running) and non-active (stuck or stopped) Apps
|
||||||
- `trueupdate --catalog CATALOGNAME` where CATALOGNAME is the name of the catalog you want to process in caps
|
- `trueupdate --catalog CATALOGNAME` where CATALOGNAME is the name of the catalog you want to process in caps
|
||||||
- `trueupdate --versioning SCHEME` where SCHEME is the highest semver version you want to process. options: `patch`, `minor` and `major`
|
- `trueupdate --versioning SCHEME` where SCHEME is the highest semver version you want to process. options: `patch`, `minor` and `major`
|
@ -51,7 +51,7 @@ def check_semver(current: str, latest: str):
|
|||||||
|
|
||||||
|
|
||||||
def execute_upgrades():
|
def execute_upgrades():
|
||||||
if ACTIVE:
|
if ALL:
|
||||||
if CATALOG == "ALL":
|
if CATALOG == "ALL":
|
||||||
filtered = filter(lambda a: a.update_available and a.status == "active", INSTALLED_CHARTS)
|
filtered = filter(lambda a: a.update_available and a.status == "active", INSTALLED_CHARTS)
|
||||||
else:
|
else:
|
||||||
@ -88,13 +88,13 @@ def process_args():
|
|||||||
global VERSIONING
|
global VERSIONING
|
||||||
global SYNC
|
global SYNC
|
||||||
global PRUNE
|
global PRUNE
|
||||||
global ACTIVE
|
global ALL
|
||||||
parser = argparse.ArgumentParser(description='Update TrueNAS SCALE Apps')
|
parser = argparse.ArgumentParser(description='Update TrueNAS SCALE Apps')
|
||||||
parser.add_argument('--catalog', nargs='?', default='ALL', help='name of the catalog you want to process in caps. Or "ALL" to render all catalogs.')
|
parser.add_argument('--catalog', nargs='?', default='ALL', help='name of the catalog you want to process in caps. Or "ALL" to render all catalogs.')
|
||||||
parser.add_argument('--versioning', nargs='?', default='minor', help='Name of the versioning scheme you want to update. Options: major, minor or patch. Defaults to minor')
|
parser.add_argument('--versioning', nargs='?', default='minor', help='Name of the versioning scheme you want to update. Options: major, minor or patch. Defaults to minor')
|
||||||
parser.add_argument('-s', '--sync', action="store_true", help='sync catalogs before trying to update')
|
parser.add_argument('-s', '--sync', action="store_true", help='sync catalogs before trying to update')
|
||||||
parser.add_argument('-p', '--prune', action="store_true", help='prune old docker images after update')
|
parser.add_argument('-p', '--prune', action="store_true", help='prune old docker images after update')
|
||||||
parser.add_argument('-a', '--active', action="store_true", help='update "active" apps only and ignore "stopped" or "stuck" apps')
|
parser.add_argument('-a', '--all', action="store_true", help='update "active" apps only and ignore "stopped" or "stuck" apps')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
CATALOG = args.catalog
|
CATALOG = args.catalog
|
||||||
VERSIONING = args.versioning
|
VERSIONING = args.versioning
|
||||||
@ -106,10 +106,10 @@ def process_args():
|
|||||||
PRUNE = True
|
PRUNE = True
|
||||||
else:
|
else:
|
||||||
PRUNE = False
|
PRUNE = False
|
||||||
if args.active:
|
if args.all:
|
||||||
ACTIVE = True
|
ALL = True
|
||||||
else:
|
else:
|
||||||
ACTIVE = False
|
ALL = False
|
||||||
|
|
||||||
def sync_catalog():
|
def sync_catalog():
|
||||||
if SYNC:
|
if SYNC:
|
||||||
|
Loading…
Reference in New Issue
Block a user