test for key and don't commit/push

This commit is contained in:
dovholuknf
2020-11-01 17:00:08 -05:00
parent e589c6156f
commit 566f2e3546
+7 -2
View File
@@ -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"
}