Don't try to git tag if not running git

This commit is contained in:
Steve Streeting 2021-08-02 15:56:47 +01:00
parent 63e3113331
commit 0f0e6f3d56

View File

@ -205,7 +205,7 @@ try {
if ($forcetag) {
$forcearg = "-f"
}
if (-not $test -and -not $dryrun) {
if (-not $test -and -not $dryrun -and $isGit) {
if ($src -ne ".") { Push-Location $src }
git tag $forcearg -a $versionNumber -m "Automated release tag"
if ($LASTEXITCODE -ne 0) { Exit $LASTEXITCODE }