File size: 1,013 Bytes
208adf4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Git ํžˆ์Šคํ† ๋ฆฌ์—์„œ Hugging Face ํ† ํฐ ์ œ๊ฑฐ ์Šคํฌ๋ฆฝํŠธ

$token = "YOUR_HUGGINGFACE_TOKEN_HERE"
$files = @(
    "EXAONE_์ถ”๊ฐ€_์•ˆ๋‚ด.md",
    "add_exaone_with_token.py",
    "download_exaone_model.py",
    "install_exaone_direct.py",
    "install_exaone_simple.py"
)

Write-Host "Git ํžˆ์Šคํ† ๋ฆฌ์—์„œ ํ† ํฐ ์ œ๊ฑฐ ์ค‘..."

# ๊ฐ ํŒŒ์ผ์— ๋Œ€ํ•ด filter-branch ์‹คํ–‰
foreach ($file in $files) {
    Write-Host "์ฒ˜๋ฆฌ ์ค‘: $file"
    
    # ํŒŒ์ผ์ด ์กด์žฌํ•˜๋Š” ์ปค๋ฐ‹๋งŒ ์ฒ˜๋ฆฌ
    $commits = git log --all --pretty=format:"%H" -- "$file" 2>$null
    if ($commits) {
        # PowerShell์„ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์ผ ๋‚ด์šฉ ์ˆ˜์ •
        git filter-branch --force --tree-filter @"
if [ -f "$file" ]; then
    sed -i 's/$token/YOUR_HUGGINGFACE_TOKEN_HERE/g' "$file" 2>/dev/null || \
    (powershell -Command "(Get-Content '$file') -replace '$token', 'YOUR_HUGGINGFACE_TOKEN_HERE' | Set-Content '$file'")
fi
"@ --prune-empty --tag-name-filter cat -- --all 2>&1 | Out-Null
    }
}

Write-Host "์™„๋ฃŒ!"