Default38693
commited on
Commit
•
d3e109a
1
Parent(s):
968e64a
Upload 2 files
Browse files- Zatta/extensionsAllUpdate.ps1 +18 -0
- Zatta/getHashList.ps1 +26 -0
Zatta/extensionsAllUpdate.ps1
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
$parentDir = "H:\WEBUI\extensions"
|
2 |
+
|
3 |
+
# ディレクトリ内のすべてのサブディレクトリを取得
|
4 |
+
$subDirs = Get-ChildItem -Path $parentDir -Directory
|
5 |
+
|
6 |
+
# 各サブディレクトリに対してカレントディレクトリを変更し、git pullを実行
|
7 |
+
foreach ($dir in $subDirs) {
|
8 |
+
# .gitディレクトリが存在するかを確認
|
9 |
+
if (Test-Path -Path "$($dir.FullName)\.git") {
|
10 |
+
Set-Location -Path $dir.FullName
|
11 |
+
git pull
|
12 |
+
Set-Location -Path $parentDir
|
13 |
+
}
|
14 |
+
else {
|
15 |
+
Write-Host "Skipping $dir, no .git directory found."
|
16 |
+
}
|
17 |
+
}
|
18 |
+
Read-Host
|
Zatta/getHashList.ps1
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
$parentDir = "H:\WEBUI\extensions"
|
2 |
+
$logFile = "$env:USERPROFILE\Desktop\hashList.log"
|
3 |
+
|
4 |
+
# ログファイルが既に存在する場合は削除
|
5 |
+
if (Test-Path $logFile) {
|
6 |
+
Remove-Item $logFile
|
7 |
+
}
|
8 |
+
|
9 |
+
# ディレクトリ内のすべてのサブディレクトリを取得
|
10 |
+
$subDirs = Get-ChildItem -Path $parentDir -Directory
|
11 |
+
|
12 |
+
# 各サブディレクトリに対してカレントディレクトリを変更し、gitの最新のコミットハッシュを取得
|
13 |
+
foreach ($dir in $subDirs) {
|
14 |
+
# .gitディレクトリが存在するかを確認
|
15 |
+
if (Test-Path -Path "$($dir.FullName)\.git") {
|
16 |
+
Set-Location -Path $dir.FullName
|
17 |
+
# 最新のコミットハッシュを取得
|
18 |
+
$hash = git rev-parse HEAD
|
19 |
+
# ログファイルに書き込み
|
20 |
+
"$($dir.Name), $hash" | Out-File -FilePath $logFile -Append
|
21 |
+
Set-Location -Path $parentDir
|
22 |
+
}
|
23 |
+
else {
|
24 |
+
Write-Host "Skipping $dir, no .git directory found."
|
25 |
+
}
|
26 |
+
}
|