forked from google/adk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommit_safe_files.sh
More file actions
executable file
·53 lines (43 loc) · 1.42 KB
/
commit_safe_files.sh
File metadata and controls
executable file
·53 lines (43 loc) · 1.42 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
#!/bin/bash
# Script to safely commit files without sensitive data
echo "🔍 Checking for sensitive files..."
if git status --porcelain | grep -q "config.ini"; then
echo "⚠️ WARNING: config.ini is in git status. Make sure it's in .gitignore!"
fi
echo ""
echo "�� Staging safe files..."
# Core implementation files
git add src/google/adk/utils/postgres_db_helper.py
git add src/google/adk/sessions/postgres_session_service.py
git add src/google/adk/memory/postgres_memory_service.py
git add src/google/adk/runner/
git add src/google/adk/server/
git add src/google/adk/models/redbus_adg.py
git add src/google/adk/models/__init__.py
# Test files
git add tests/unittests/sessions/test_postgres_session_service.py
git add tests/unittests/memory/test_postgres_memory_service.py
# Documentation
git add REDBUS_ADK_PYTHON_README.md
git add *.md
# Example configs
git add config.ini.example
git add config.example.json
git add config.example.yaml
# Gitignore update
git add .gitignore
echo ""
echo "✅ Files staged. Verifying no sensitive files..."
echo ""
git status --short
echo ""
echo "🔒 Security check:"
if git diff --cached --name-only | grep -E "config\.ini$|\.env$"; then
echo "❌ ERROR: Sensitive files detected in staged changes!"
exit 1
else
echo "✅ No sensitive files detected in staged changes"
fi
echo ""
echo "📝 Ready to commit. Run:"
echo " git commit -m 'feat(postgres): Add PostgreSQL-backed services'"