From f99a4e9f20fc6c970b1e064ec383aae7d4bbb4e9 Mon Sep 17 00:00:00 2001 From: Ilya Kuleshov Date: Tue, 23 Nov 2021 16:44:34 +0300 Subject: [PATCH 1/2] Add OneLocBuild removal to the pipeline --- Localize/localize-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localize/localize-pipeline.yml b/Localize/localize-pipeline.yml index cef451c3a..d7036a0e0 100644 --- a/Localize/localize-pipeline.yml +++ b/Localize/localize-pipeline.yml @@ -71,10 +71,10 @@ stages: git checkout -b $updateBranch - Remove-Item -Recurse -Force Localize + Remove-Item -Recurse -Force Localize, OneLocBuild -ErrorAction Ignore git add -A - git commit -m "Removing Localize folder" + git commit -m "Removing Localize and OneLocBuild folder" git push origin $updateBranch displayName: Create and push localization update branch condition: and(succeeded(), or(and(eq(variables['SHOULDCREATEPR'], 'True'), eq(variables['build.reason'], 'Schedule')), eq(variables['build.reason'], 'Manual'))) From 8010e14e9a15ef468fdfb1991c8729eaa47c4b7a Mon Sep 17 00:00:00 2001 From: Ilya Kuleshov Date: Thu, 25 Nov 2021 15:01:03 +0300 Subject: [PATCH 2/2] fix ignore error to double if --- Localize/localize-pipeline.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Localize/localize-pipeline.yml b/Localize/localize-pipeline.yml index d7036a0e0..444f93e5d 100644 --- a/Localize/localize-pipeline.yml +++ b/Localize/localize-pipeline.yml @@ -71,8 +71,14 @@ stages: git checkout -b $updateBranch - Remove-Item -Recurse -Force Localize, OneLocBuild -ErrorAction Ignore - + if (Test-Path -Path Localize) { + Remove-Item -Recurse -Force Localize + } + + if (Test-Path -Path OneLocBuild) { + Remove-Item -Recurse -Force OneLocBuild + } + git add -A git commit -m "Removing Localize and OneLocBuild folder" git push origin $updateBranch