File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 66 " build.proj"
77 ],
88 "UnSyncPath" : [
9- " tools/BranchSync "
9+ " .azure-pipelines/SyncFromMainBranchConfig.json "
1010 ]
1111}
Original file line number Diff line number Diff line change 3535 inputs :
3636 targetType : inline
3737 script : >-
38- ./tools/BranchSync/BranchSync .ps1 -BranchName $(BranchName) -GithubToken $env:GITHUB_TOKEN
38+ ./tools/SyncFromMainBranch .ps1 -BranchName $(BranchName) -GithubToken $env:GITHUB_TOKEN
3939 pwsh : true
Original file line number Diff line number Diff line change 66 [string ]$GithubToken
77)
88
9- $Config = Get-Content (Join-Path $PSScriptRoot " config .json" ) | ConvertFrom-Json
9+ $Config = Get-Content (Join-Path $PSScriptRoot " ../.azure-pipelines/SyncFromMainBranchConfig .json" ) | ConvertFrom-Json
1010$TmpFolder = New-Item - ItemType Directory - Path tmp
1111
1212foreach ($SyncPath in $Config.SyncPath )
1313{
1414 Write-Host " Back up $SyncPath from main branch."
15- Copy-Item - Path $SyncPath - Destination " $TmpFolder /$SyncPath " - Recurse
15+ Copy-Item - Path $SyncPath - Destination " $TmpFolder /$SyncPath " - Recurse - Force
1616}
1717
1818git config
-- global user.email
" [email protected] " @@ -30,10 +30,10 @@ foreach ($UnSyncPath in $Config.UnSyncPath)
3030foreach ($SyncPath in $Config.SyncPath )
3131{
3232 Remove-Item - Path $SyncPath - Recurse
33- Copy-Item - Path " $TmpFolder /$SyncPath " - Destination $SyncPath - Recurse
33+ Copy-Item - Path " $TmpFolder /$SyncPath " - Destination $SyncPath - Recurse - Force
3434 git add $SyncPath
3535}
3636
3737git commit - m " Sync tools folder from main branch to $BranchName branch"
3838git remote set-url origin " https://$GithubToken @github.com/Azure/azure-powershell.git"
39- git push origin " syncToolsFolder-$BranchName " -- force
39+ git push origin " syncToolsFolder-$BranchName " -- force
You can’t perform that action at this time.
0 commit comments