feat(Makefile): restructure Makefile into modular files for better organization and maintainability

feat(Makefile): introduce common.mk for shared variables and environment configuration
feat(Makefile): create web.mk for web frontend-related tasks
feat(Makefile): create launchpad.mk for internal launchpad deployment tasks
feat(Makefile): create mobile.mk for mobile app development tasks
feat(Makefile): create dataconnect.mk for Data Connect management tasks
feat(Makefile): create tools.mk for development tools like git hooks
feat(Makefile): remove admin-web specific tasks and files as the admin console is no longer actively maintained
feat(Makefile): update help command to reflect the new modular structure and available commands
feat(Makefile): remove base44 export workflow as it is no longer relevant
feat(Makefile): remove IAP configuration as it is no longer used
feat(Makefile): remove harness-related tasks as they are no longer relevant

The Makefile has been significantly refactored to improve organization and maintainability. The changes include:

- Modularization: The monolithic Makefile has been split into smaller, more manageable files, each responsible for a specific area of the project (web, launchpad, mobile, dataconnect, tools).
- Common Configuration: Shared variables and environment configuration are now centralized in common.mk.
- Removal of Unused Tasks: Tasks related to the admin console, base44 export workflow, IAP configuration, and API test harness have been removed as they are no longer relevant.
- Updated Help Command: The help command has been updated to reflect the new modular structure and available commands.
- Improved Readability: The modular structure makes the Makefile easier to read and understand.
- Maintainability: The modular structure makes it easier to maintain and update the Makefile.
- Scalability: The modular structure makes it easier to add new tasks and features to the Makefile.
This commit is contained in:
bwnyasse
2026-01-10 20:59:18 -05:00
parent d0a536ffa4
commit b8d156b35a
47 changed files with 272 additions and 7124 deletions

View File

@@ -1,106 +0,0 @@
#!/usr/bin/env python3
import subprocess
import os
import re
import argparse
# --- Configuration ---
INPUT_FILE = "issues-to-create.md"
DEFAULT_PROJECT_TITLE = "Krow"
# ---
def create_issue(title, body, labels, milestone, project_title=None):
"""Creates a GitHub issue using the gh CLI."""
command = ["gh", "issue", "create"]
command.extend(["--title", title])
command.extend(["--body", body])
if project_title:
command.extend(["--project", project_title])
if milestone:
command.extend(["--milestone", milestone])
for label in labels:
command.extend(["--label", label])
print(f" -> Creating issue: \"{title}\"")
try:
result = subprocess.run(command, check=True, text=True, capture_output=True)
print(result.stdout.strip())
except subprocess.CalledProcessError as e:
print(f"❌ ERROR: Failed to create issue '{title}'.")
print(f" Stderr: {e.stderr.strip()}")
def main():
"""Main function to parse the file and create issues."""
parser = argparse.ArgumentParser(description="Bulk create GitHub issues from a markdown file.")
parser.add_argument("--project", default=DEFAULT_PROJECT_TITLE, help="GitHub Project title to add issues to.")
parser.add_argument("--no-project", action="store_true", help="Do not add issues to any project.")
args = parser.parse_args()
project_title = args.project if not args.no_project else None
print(f"🚀 Starting bulk creation of GitHub issues from '{INPUT_FILE}'...")
if project_title:
print(f" Target Project: '{project_title}'")
else:
print(" Target Project: (None)")
if subprocess.run(["which", "gh"], capture_output=True).returncode != 0:
print("❌ ERROR: GitHub CLI (gh) is not installed.")
exit(1)
if not os.path.exists(INPUT_FILE):
print(f"❌ ERROR: Input file {INPUT_FILE} not found.")
exit(1)
print("✅ Dependencies and input file found.")
print(f"2. Reading and parsing {INPUT_FILE}...")
with open(INPUT_FILE, 'r') as f:
content = f.read()
# Split the content by lines starting with '# '
issue_blocks = re.split(r'\n(?=#\s)', content)
for block in issue_blocks:
if not block.strip():
continue
lines = block.strip().split('\n')
title = lines[0].replace('# ', '').strip()
labels_line = ""
milestone_line = ""
body_start_index = 1
# Find all metadata lines (Labels, Milestone) at the beginning of the body
for i, line in enumerate(lines[1:]):
line_lower = line.strip().lower()
if line_lower.startswith('labels:'):
labels_line = line.split(':', 1)[1].strip()
elif line_lower.startswith('milestone:'):
milestone_line = line.split(':', 1)[1].strip()
elif line.strip() == "":
continue # Ignore blank lines in the metadata header
else:
# This is the first real line of the body
body_start_index = i + 1
break
body = "\n".join(lines[body_start_index:]).strip()
labels = [label.strip() for label in labels_line.split(',') if label.strip()]
milestone = milestone_line
if not title:
print("⚠️ Skipping block with no title.")
continue
create_issue(title, body, labels, milestone, project_title)
print("\n🎉 Bulk issue creation complete!")
if __name__ == "__main__":
main()