-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_simple_firebase_cli.sh
More file actions
executable file
·63 lines (49 loc) · 1.7 KB
/
deploy_simple_firebase_cli.sh
File metadata and controls
executable file
·63 lines (49 loc) · 1.7 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
#!/bin/bash
# Firebase Remote Config Deployment - Basit Yöntem
# Mevcut config'i al, yeni parametreleri ekle, yükle
set -e
echo "🚀 Firebase Remote Config Deployment (Basit Yöntem)"
echo "=================================================="
echo ""
# Mevcut config'i al
echo "📥 Mevcut Remote Config alınıyor..."
firebase remoteconfig:get -o current_config.json
# Yeni config'i oku
echo "📖 Yeni config hazırlanıyor..."
python3 -c "
import json
# Mevcut config'i yükle
with open('current_config.json', 'r') as f:
current = json.load(f)
# Yeni config'i yükle
with open('remote_config_merged.json', 'r') as f:
new = json.load(f)
# Parametreleri birleştir
current_params = current.get('parameters', {})
new_params = new.get('parameters', {})
# Yeni parametreleri ekle
added = 0
for key, value in new_params.items():
if key not in current_params:
current_params[key] = value
added += 1
print(f'✅ {key} eklendi')
print(f'\n📊 {added} yeni parametre eklendi')
# Birleştirilmiş config'i kaydet
current['parameters'] = current_params
with open('final_config.json', 'w') as f:
json.dump(current, f, indent=2)
print('✅ final_config.json hazırlandı')
"
echo ""
echo "📤 Firebase Console'dan yüklemek için:"
echo " 1. final_config.json dosyasını aç"
echo " 2. Firebase Console → Remote Config"
echo " 3. Her parametreyi manuel olarak ekle"
echo ""
echo "💡 VEYA Service Account Key ile otomatik yükle:"
echo " 1. Firebase Console → Project Settings → Service Accounts"
echo " 2. 'Generate new private key' → JSON indir"
echo " 3. Dosyayı firebase-service-account.json olarak kaydet"
echo " 4. python3 deploy_with_service_account.py"
echo ""