-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpixel
More file actions
executable file
ยท102 lines (92 loc) ยท 3.03 KB
/
pixel
File metadata and controls
executable file
ยท102 lines (92 loc) ยท 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash
# ============================================
# ๐ฎ PixelScale Unified Command Center
# Manage all apps: Academy, Amazon, Playmaker
# ============================================
set -e
# Colors
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
function show_menu() {
clear
echo -e "${BLUE}==============================================${NC}"
echo -e "${GREEN} ๐ฎ PixelScale Command Center ๐ฎ${NC}"
echo -e "${BLUE}==============================================${NC}"
echo ""
echo "Select an app to manage:"
echo ""
echo -e "${YELLOW}--- APPS ---${NC}"
echo "1) ๐พ Academy App (Expo)"
echo "2) ๐ฆ Amazon Manager (Flutter)"
echo "3) โฝ Playmaker (Flutter)"
echo ""
echo -e "${YELLOW}--- GLOBAL ---${NC}"
echo "4) ๐ Build ALL Apps (Release Sequence)"
echo "5) Exit"
echo ""
read -p "Enter choice [1-5]: " choice
run_choice "$choice"
}
function run_choice() {
case $1 in
1)
cd apps/academy-app && ./pm
;;
2)
cd apps/amazon-manager && ./pm
;;
3)
# Check if pm exists in playmaker, otherwise run script directly or create a wrapper
if [ -f "apps/playmakerstart/pm" ]; then
cd apps/playmakerstart && ./pm
else
# Fallback if Playmaker doesn't have a 'pm' script yet
echo -e "${YELLOW}Playmaker 'pm' script not found. Using run script...${NC}"
cd apps/playmakerstart && ./run_user_app_android.sh
fi
;;
4)
build_all
;;
5)
echo "Exiting..."
exit 0
;;
*)
echo -e "${RED}Invalid option.${NC}"
sleep 1
show_menu
;;
esac
}
function build_all() {
echo -e "${BLUE}==============================================${NC}"
echo -e "${YELLOW}๐ STARTING GLOBAL BUILD SEQUENCE ๐${NC}"
echo -e "${BLUE}==============================================${NC}"
# 1. Playmaker
echo -e "\n${GREEN}1/3 Building Playmaker...${NC}"
cd apps/playmakerstart
# Use existing build scripts
./build_android_user_release.sh || echo -e "${RED}Playmaker Android Failed${NC}"
# ./build_ios_user_release.sh # Uncomment if on Mac with Xcode
cd ../..
# 2. Academy App
echo -e "\n${GREEN}2/3 Building Academy App...${NC}"
cd apps/academy-app
# Use the pm script or direct build
./build-release-apk.sh || echo -e "${RED}Academy APK Failed${NC}"
cd ../..
# 3. Amazon Manager
echo -e "\n${GREEN}3/3 Building Amazon Manager...${NC}"
cd apps/amazon-manager
flutter build apk --release || echo -e "${RED}Amazon APK Failed${NC}"
cd ../..
echo -e "\n${BLUE}==============================================${NC}"
echo -e "${GREEN}โ
GLOBAL BUILD SEQUENCE COMPLETED${NC}"
echo -e "${BLUE}==============================================${NC}"
}
# Run menu
show_menu