From a3631de5301a8e22649c9bbed0ca54b44e23087f Mon Sep 17 00:00:00 2001 From: Richard Macias Date: Sat, 14 Feb 2026 15:33:25 -0600 Subject: [PATCH] chore: more spring cleaning and refactoring --- .github/workflows/ci.yml | 6 +++--- CONTRIBUTING.md | 12 ++++++------ Makefile | 9 +++++---- README.md | 2 +- pages/footer.md | 2 +- scripts/add-app.py | 2 +- scripts/release.py | 8 ++++---- 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 072aea5..add5875 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,13 +47,13 @@ jobs: with: python-version: "3.11" - - name: Run make release - run: make release + - name: Run make build + run: make build - name: Check for uncommitted changes run: | if [ -n "$(git diff --name-only)" ]; then - echo "Generated files are out of date. Run 'make release' and commit the results." + echo "Generated files are out of date. Run 'make build' and commit the results." echo "" echo "Changed files:" git diff --name-only diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6258ef1..43f899c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ cd Obtainium-Emulation-Pack # Make your changes to src/applications.json (or use make add-app) make validate # check for structural errors make test # verify configs resolve to real APKs -make release # normalize, regenerate README, build release JSONs +make build # normalize, regenerate README, build release JSONs ``` ## Project Structure @@ -64,7 +64,7 @@ This will: > **Tip:** To find the package ID, open the app in Obtainium - the package ID is displayed directly below the source URL (e.g., `com.example.android`). -After running, execute `make release` to regenerate all files. +After running, execute `make build` to regenerate all files. ### Option B: Manual Add (For complex configs or non-GitHub sources) @@ -119,7 +119,7 @@ Add a `meta` object to customize how the app appears: ```bash make validate # check for structural errors make test # verify your app config resolves to a real APK -make release # normalize, regenerate README, build release JSONs +make build # normalize, regenerate README, build release JSONs ``` ## CI @@ -128,13 +128,13 @@ Pull requests and pushes to `main` are checked by GitHub Actions: 1. **Validate** - runs `make validate` (structural checks, regex syntax, source types) 2. **Live Test** - runs `make test` (verifies all app configs resolve to real APKs) -3. **Check Generated Files** - runs `make release` and fails if generated files are out of date +3. **Check Generated Files** - runs `make build` and fails if generated files are out of date All three must pass before merging. ## Pre-Commit Checklist -Before committing, run `make test` and `make release`, then verify: +Before committing, run `make test` and `make build`, then verify: - [ ] `make test` passes (all app configs resolve to downloadable APKs) - [ ] `obtainium-emulation-pack-latest.json` has been updated @@ -154,7 +154,7 @@ Before committing, run `make test` and `make release`, then verify: | `make test` | Live-test all app configs resolve to downloadable APKs | | `make test-app APP=name` | Live-test a single app by name (partial match) | | `make test-verbose` | Live-test all apps with APK URL details | -| `make release` | Full pipeline: validate, normalize, readme, both JSONs | +| `make build` | Full pipeline: validate, normalize, readme, both JSONs | | `make normalize` | Normalize key order and backfill defaults | | `make table` | Generate the README table only | | `make readme` | Generate README.md from pages | diff --git a/Makefile b/Makefile index be3a0c5..1a17bf6 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,10 @@ -.PHONY: help all readme validate add-app normalize publish publish-dry-run publish-from-file test test-app test-verbose +.PHONY: help all readme validate add-app normalize build publish publish-dry-run publish-from-file test test-app test-verbose default: help help: # Show help for each of the makefile recipes. - @grep -E '^[a-zA-Z0-9 -]+:.*#' Makefile | sort | while read -r l; \ - do printf "\033[1;32m$$(echo $$l | cut -f 1 -d':')\033[00m:$$(echo $$l | cut -f 2- -d'#')\n"; done + @width=$$(grep -E '^[a-zA-Z0-9 -]+:.*#' Makefile | cut -f1 -d':' | awk '{print length}' | sort -rn | head -1); \ + grep -E '^[a-zA-Z0-9 -]+:.*#' Makefile | sort | while read -r l; \ + do printf "\033[1;32m%-$${width}s\033[00m %s\n" "$$(echo $$l | cut -f 1 -d':')" "$$(echo $$l | cut -f 2- -d'#')"; done # --------------------------------------------------------------------------- # Apps @@ -31,7 +32,7 @@ test-verbose: # Live-test with APK URL details shown # Build # --------------------------------------------------------------------------- -release: validate normalize readme minify minify-dual-screen # Run all Make targets related to cutting a release. +build: validate normalize readme minify minify-dual-screen # Build all artifacts: validate, normalize, readme, and both release JSONs. minify: # Generate standard release JSON @python scripts/minify-json.py src/applications.json obtainium-emulation-pack-latest.json --variant standard diff --git a/README.md b/README.md index 220349a..1b1226c 100644 --- a/README.md +++ b/README.md @@ -168,5 +168,5 @@ cd Obtainium-Emulation-Pack # Add or edit apps in src/applications.json (or use make add-app) make test # verify configs resolve to real APKs -make release # validate, regenerate README, and build release JSONs +make build # validate, regenerate README, and build release JSONs ``` diff --git a/pages/footer.md b/pages/footer.md index d40337a..79bc643 100644 --- a/pages/footer.md +++ b/pages/footer.md @@ -10,5 +10,5 @@ cd Obtainium-Emulation-Pack # Add or edit apps in src/applications.json (or use make add-app) make test # verify configs resolve to real APKs -make release # validate, regenerate README, and build release JSONs +make build # validate, regenerate README, and build release JSONs ``` diff --git a/scripts/add-app.py b/scripts/add-app.py index dc8f917..75e2bbc 100644 --- a/scripts/add-app.py +++ b/scripts/add-app.py @@ -357,7 +357,7 @@ def main() -> int: print() print("Next steps:") - print(" 1. Run 'make release' to regenerate all files") + print(" 1. Run 'make build' to regenerate all files") print(" 2. Review the diff before committing") return 0 diff --git a/scripts/release.py b/scripts/release.py index b8312b2..5a1d620 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -1,6 +1,6 @@ """Create a GitHub release with tagged JSON artifacts. -Expects `make release` to have already been run. This script only handles +Expects `make build` to have already been run. This script only handles the publish side: tagging, pushing, and creating the GitHub release. Workflow: @@ -12,7 +12,7 @@ Workflow: 6. Create git tag, push, and create GitHub release Usage: - make release # build artifacts first + make build # build artifacts first make publish # then publish Requires: gh (GitHub CLI), git, python3 @@ -463,7 +463,7 @@ def main() -> None: for f in (STANDARD_JSON, DUAL_SCREEN_JSON): if not f.exists(): print(f"Error: Expected artifact not found: {f}") - print("Did you run `make release` first?") + print("Did you run `make build` first?") sys.exit(1) # Show summary before proceeding @@ -486,7 +486,7 @@ def main() -> None: print("Aborted.") sys.exit(0) - # Commit any uncommitted changes (e.g. from `make release`) + # Commit any uncommitted changes (e.g. from `make build`) if not check_working_tree_clean(): print() print("Working tree has changes. Committing...")