-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_v2.py
More file actions
62 lines (49 loc) · 1.49 KB
/
deploy_v2.py
File metadata and controls
62 lines (49 loc) · 1.49 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
import argparse
import json
from pathlib import Path
FEATURES = [
"secure_code_review",
"morning_briefing",
"sync_daemon",
]
def parse_args():
p = argparse.ArgumentParser(description="Deploy Ava Prime v2.0 features")
p.add_argument(
"--environment",
choices=["development", "staging", "production"],
default="development",
help="Target environment",
)
p.add_argument(
"--enable-features",
default="all",
help="Comma-separated features to enable or 'all'",
)
p.add_argument(
"--dry-run",
action="store_true",
help="Print actions without persisting state",
)
return p.parse_args()
def main():
args = parse_args()
if args.enable_features == "all":
selected = FEATURES
else:
selected = [f.strip() for f in args.enable_features.split(",") if f.strip()]
print(f"Deploying to: {args.environment}")
print(f"Enabling features: {selected}")
state = {
"environment": args.environment,
"enabled_features": selected,
}
if args.dry_run:
print("[DRY RUN] Deployment plan:")
print(json.dumps(state, indent=2))
return 0
Path("deploy_state.json").write_text(json.dumps(state, indent=2), encoding="utf-8")
print("Deployment state written to deploy_state.json")
print("Next: run 'python ava_prime_integration.py' in the target environment.")
return 0
if __name__ == "__main__":
raise SystemExit(main())