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 "์๋ฃ!"
|