v1.8.75: build.py auto-deploys ssh.py, encryption.py, skill to local dirs
Prevents stale ~/.server-connections/ssh.py after code changes. Every build now auto-copies tools/ssh.py, core/encryption.py and tools/skill-ssh.md to their shared locations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
34
build.py
34
build.py
@@ -161,6 +161,9 @@ def build():
|
||||
# Auto-cleanup: keep first release + last 5 (per CLAUDE.md policy)
|
||||
cleanup_old_releases()
|
||||
|
||||
# Auto-deploy: sync shared files so Claude Code always has the latest
|
||||
deploy_shared_files()
|
||||
|
||||
|
||||
def cleanup_old_releases():
|
||||
"""Keep the first release (v1.0.0) and the last 5 releases, delete the rest."""
|
||||
@@ -187,6 +190,37 @@ def cleanup_old_releases():
|
||||
print(f"Cleaned {len(removed)} old releases: {', '.join(removed)}")
|
||||
|
||||
|
||||
def deploy_shared_files():
|
||||
"""Auto-deploy ssh.py, encryption.py, skill to shared dirs after build.
|
||||
|
||||
Ensures Claude Code /ssh skill always uses the latest version.
|
||||
Without this, editing tools/ssh.py updates the exe but NOT the live
|
||||
~/.server-connections/ssh.py that Claude Code actually calls.
|
||||
"""
|
||||
shared_dir = os.path.expanduser("~/.server-connections")
|
||||
skill_dir = os.path.expanduser("~/.claude/commands")
|
||||
|
||||
deploy_map = [
|
||||
(os.path.join(PROJECT_DIR, "tools", "ssh.py"),
|
||||
os.path.join(shared_dir, "ssh.py")),
|
||||
(os.path.join(PROJECT_DIR, "core", "encryption.py"),
|
||||
os.path.join(shared_dir, "encryption.py")),
|
||||
(os.path.join(PROJECT_DIR, "tools", "skill-ssh.md"),
|
||||
os.path.join(skill_dir, "ssh.md")),
|
||||
]
|
||||
|
||||
deployed = []
|
||||
for src, dst in deploy_map:
|
||||
if not os.path.exists(src):
|
||||
continue
|
||||
os.makedirs(os.path.dirname(dst), exist_ok=True)
|
||||
shutil.copy2(src, dst)
|
||||
deployed.append(os.path.basename(dst))
|
||||
|
||||
if deployed:
|
||||
print(f"Auto-deployed to local: {', '.join(deployed)}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--clean" in sys.argv:
|
||||
clean()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
"""Version info for ServerManager."""
|
||||
|
||||
__version__ = "1.8.74"
|
||||
__version__ = "1.8.75"
|
||||
__app_name__ = "ServerManager"
|
||||
__author__ = "aibot777"
|
||||
__description__ = "Desktop GUI for managing remote servers"
|
||||
|
||||
Reference in New Issue
Block a user