From 8e797d985195f9fe120c09c1bffa2e011276eaa8 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Fri, 14 Mar 2025 17:19:46 -0400 Subject: [PATCH] version --- local-app/python-tools/gfl-resource-actions/main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/local-app/python-tools/gfl-resource-actions/main.py b/local-app/python-tools/gfl-resource-actions/main.py index 47360fba..e9c10c0e 100644 --- a/local-app/python-tools/gfl-resource-actions/main.py +++ b/local-app/python-tools/gfl-resource-actions/main.py @@ -11,6 +11,10 @@ from discovery import get_account_resources from managers import EC2Manager, RDSManager, EKSManager, EMRManager +# Application version information +APP_NAME = "AWS Organization Resource Management Tool" +APP_VERSION = "1.0.0" # Semantic versioning: MAJOR.MINOR.PATCH + logger = setup_logging() def parse_arguments(): @@ -24,6 +28,7 @@ def parse_arguments(): parser.add_argument("--exclude-resources", choices=["ec2", "rds", "eks", "emr"], nargs="+", help="Resource types to exclude from management") parser.add_argument("--help-detail", action="store_true", help="Show detailed help information and exit") + parser.add_argument("--version", action="store_true", help="Show version information and exit") return parser.parse_args() def show_detailed_help(): @@ -61,6 +66,11 @@ def main(): """Main execution function.""" args = parse_arguments() + # Check if version information was requested + if args.version: + print(f"{APP_NAME} v{APP_VERSION}") + sys.exit(0) + # Check if detailed help was requested if args.help_detail: show_detailed_help()