Skip to content

Commit

Permalink
Add sync path and unsync path
Browse files Browse the repository at this point in the history
  • Loading branch information
wyunchi-ms committed Oct 11, 2021
1 parent afbb6cd commit a574657
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/BranchSync/BranchSync.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ foreach ($SyncPath in $Config.SyncPath)
Copy-Item -Path $SyncPath -Destination "$TmpFolder/$SyncPath" -Recurse
}

# git config --global user.email "[email protected]"
# git config --global user.name "azurepowershell"
# git checkout -b "syncToolsFolder-$BranchName" "origin/$BranchName"
git config --global user.email "[email protected]"
git config --global user.name "azurepowershell"
git checkout -b "syncToolsFolder-$BranchName" "origin/$BranchName"

foreach ($UnSyncPath in $Config.UnSyncPath)
{
Expand All @@ -29,10 +29,10 @@ foreach ($UnSyncPath in $Config.UnSyncPath)
foreach ($SyncPath in $Config.SyncPath)
{
Remove-Item -Path $SyncPath -Recurse
Copy-Item -Path "$TmpFolder/$UnSyncPath" -Destination $SyncPath -Recurse
# git add $SyncPath
Copy-Item -Path "$TmpFolder/$SyncPath" -Destination $SyncPath -Recurse
git add $SyncPath
}

# git commit -m "Sync tools folder from main branch to $BranchName branch"
# git remote set-url origin "https://[email protected]/Azure/azure-powershell.git"
# git push origin "syncToolsFolder-$BranchName" --force
git commit -m "Sync tools folder from main branch to $BranchName branch"
git remote set-url origin "https://$GithubToken@github.com/Azure/azure-powershell.git"
git push origin "syncToolsFolder-$BranchName" --force

0 comments on commit a574657

Please sign in to comment.