Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiospizzi committed Sep 30, 2018
1 parent 4dff0b5 commit ea05439
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.psake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ Task GitHub -requiredVariables ReleasePath, ModuleNames, GitHubEnabled, GitHubRe
throw 'GitHub key is null or empty!'
}

Test-GitRepo
Test-GitRepo $ModuleNames[0]

$plainGitHubToken = $GitHubToken | Unprotect-SecureString

Expand Down Expand Up @@ -463,7 +463,7 @@ Task Gallery -requiredVariables ReleasePath, ModuleNames, GalleryEnabled, Galler
throw 'PowerShell Gallery key is null or empty!'
}

Test-GitRepo
Test-GitRepo $ModuleNames[0]

# Register the target PowerShell Gallery, if it does not exist
if ($null -eq (Get-PSRepository -Name $GalleryName -ErrorAction SilentlyContinue))
Expand All @@ -486,7 +486,7 @@ Task Gallery -requiredVariables ReleasePath, ModuleNames, GalleryEnabled, Galler
## Helper functions

# Check if the git repo is ready for a deployment
function Test-GitRepo
function Test-GitRepo($ModuleName)
{
$gitStatus = Get-GitStatus
if ($gitStatus.Branch -ne 'master')
Expand All @@ -505,7 +505,7 @@ function Test-GitRepo
throw "Git Exception: master branch is ahead by $($gitStatus.AheadBy)! (git push)"
}

$version = (Import-PowerShellDataFile -Path "$ReleasePath\$moduleName\$moduleName.psd1").ModuleVersion
$version = (Import-PowerShellDataFile -Path "$ReleasePath\$ModuleName\$ModuleName.psd1").ModuleVersion

$localTag = (git describe --tags)
if ($version -ne $localTag)
Expand Down

0 comments on commit ea05439

Please sign in to comment.