feat: add build.sh scaffold with menu
Made-with: Cursor
This commit is contained in:
70
build.sh
Executable file
70
build.sh
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
# --- Colors ---
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
CYAN='\033[0;36m'
|
||||
BOLD='\033[1m'
|
||||
DIM='\033[2m'
|
||||
NC='\033[0m'
|
||||
|
||||
# --- Config ---
|
||||
KEYSTORE_DIR="keystore"
|
||||
KEYSTORE_FILE="$KEYSTORE_DIR/radio247-release.jks"
|
||||
KEY_ALIAS="radio247"
|
||||
DIST_DIR="dist"
|
||||
GRADLE_BUILD_FILE="app/build.gradle.kts"
|
||||
|
||||
banner() {
|
||||
echo ""
|
||||
echo -e "${CYAN}╔══════════════════════════════════╗${NC}"
|
||||
echo -e "${CYAN}║${BOLD} Radio 247 Build Tool ${NC}${CYAN}║${NC}"
|
||||
echo -e "${CYAN}╚══════════════════════════════════╝${NC}"
|
||||
echo ""
|
||||
}
|
||||
|
||||
info() { echo -e "${BLUE}▸${NC} $1"; }
|
||||
success() { echo -e "${GREEN}✓${NC} $1"; }
|
||||
warn() { echo -e "${YELLOW}⚠${NC} $1"; }
|
||||
error() { echo -e "${RED}✗${NC} $1"; }
|
||||
|
||||
main_menu() {
|
||||
echo -e "${BOLD}What would you like to do?${NC}"
|
||||
echo ""
|
||||
echo -e " ${BOLD}1)${NC} Build Release APK ${DIM}(signed, shareable)${NC}"
|
||||
echo -e " ${BOLD}2)${NC} Build Debug APK ${DIM}(quick, for testing)${NC}"
|
||||
echo -e " ${BOLD}3)${NC} Manage Keystore ${DIM}(create or check signing key)${NC}"
|
||||
echo -e " ${BOLD}4)${NC} Clean ${DIM}(remove build artifacts)${NC}"
|
||||
echo -e " ${BOLD}5)${NC} Exit"
|
||||
echo ""
|
||||
|
||||
local choice
|
||||
read -rp "> " choice
|
||||
case $choice in
|
||||
1) build_release ;;
|
||||
2) build_debug ;;
|
||||
3) manage_keystore ;;
|
||||
4) clean_build ;;
|
||||
5) echo ""; exit 0 ;;
|
||||
*) warn "Invalid choice. Pick 1-5." ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Placeholder functions — implemented in subsequent tasks
|
||||
build_release() { warn "Not yet implemented"; }
|
||||
build_debug() { warn "Not yet implemented"; }
|
||||
manage_keystore() { warn "Not yet implemented"; }
|
||||
clean_build() { warn "Not yet implemented"; }
|
||||
|
||||
# --- Main ---
|
||||
banner
|
||||
while true; do
|
||||
main_menu
|
||||
echo ""
|
||||
done
|
||||
Reference in New Issue
Block a user