From 566f2e354648ecb6aaa7c2f4f3a80b0fd13bd8f3 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Sun, 1 Nov 2020 17:00:08 -0500 Subject: [PATCH] test for key and don't commit/push --- Installer/build.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Installer/build.ps1 b/Installer/build.ps1 index 9f410bc3..b395b9a1 100644 --- a/Installer/build.ps1 +++ b/Installer/build.ps1 @@ -40,14 +40,19 @@ echo "Assembling installer using AdvancedInstaller at: $ADVINST $action $ADVPROJ & $ADVINST $action $ADVPROJECT $gituser=$(git config user.name) +$ghkey=$(ls github_deploy_key) if($gituser -eq "ziti-ci") { echo "yes ziti-ci" git add service/ziti-tunnel/version.go git add DesktopEdge/Properties/AssemblyInfo.cs git add ZitiUpdateService/Properties/AssemblyInfo.cs git add Installer/ZitiDesktopEdge.aip - git commit -m "[ci skip] committing updated installer file" 2>&1 - git push + if(Test-Path .\github_deploy_key) { + git commit -m "[ci skip] committing updated installer file" 2>&1 + git push + } else { + echo "detected ziti-zi - but no gh_deploy_key so no commit and no push" + } } else { echo "detected user [${gituser}] which is not ziti-ci - skipping installer commit" }