Skip to content

Commit

Permalink
version
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Mar 14, 2025
1 parent d4b9bf9 commit 8e797d9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions local-app/python-tools/gfl-resource-actions/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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():
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 8e797d9

Please sign in to comment.