chore(rebar): Pier_T_rebar 작업 폴더 초기 구성 및 외부 의존 파일 통합
- Code\rebar_pipeline, review_pipeline, pier-program을 정션에서 실제 폴더로 전환 - Code\rhino_mcp 및 CLAUDE_rhino배경.md 추가, .mcp.json은 PYTHONPATH로 새 위치 사용 - pier-program 내부 .git 제거(이력은 backup\pier-program_20261028.bundle에 보관) - worktree 가이드 반영(CLAUDE.local.md, HANDOFF.md) - D:\Rhino-MCP 경로 참조를 새 위치로 치환 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
964a841de1
3978 files changed
+58013356
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import datetime
|
||||
|
||||
def create_snapshot(file_path):
|
||||
"""
|
||||
Creates a timestamped backup of the given file in .hmcmkit/backups/
|
||||
"""
|
||||
if not os.path.exists(file_path):
|
||||
print(f"❌ Error: File not found: {file_path}")
|
||||
return None
|
||||
|
||||
# Determine paths
|
||||
hmcmkit_root = ".hmcmkit"
|
||||
backup_dir = os.path.join(hmcmkit_root, "backups")
|
||||
os.makedirs(backup_dir, exist_ok=True)
|
||||
|
||||
# Generate timestamped name
|
||||
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||
filename = os.path.basename(file_path)
|
||||
backup_name = f"{timestamp}_{filename}"
|
||||
backup_path = os.path.join(backup_dir, backup_name)
|
||||
|
||||
try:
|
||||
shutil.copy2(file_path, backup_path)
|
||||
print(f"📦 Snapshot created: {backup_path}")
|
||||
return backup_path
|
||||
except Exception as e:
|
||||
print(f"❌ Snapshot failed: {e}")
|
||||
return None
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: python snapshot.py <file_path>")
|
||||
sys.exit(1)
|
||||
|
||||
create_snapshot(sys.argv[1])
|
||||
Reference in new issue
Block a user