Skip to content

Commit

Permalink
Update Azure pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
peombwa committed May 6, 2020
1 parent e16530e commit 5930fed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/generate-beta-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
displayName: 'Build Auth Modules'
inputs:
filePath: '$(System.DefaultWorkingDirectory)/tools/GenerateAuthenticationModule.ps1'
arguments: '-RepositoryApiKey $(Api_Key) -ArtifactsLocation $(Build.ArtifactStagingDirectory) -Build -EnableSigning'
arguments: '-RepositoryApiKey $(Api_Key) -ArtifactsLocation $(Build.ArtifactStagingDirectory) -Build -BuildWhenEqual -EnableSigning'
pwsh: true

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
Expand Down
7 changes: 4 additions & 3 deletions tools/GenerateAuthenticationModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Param(
[switch] $Build,
[switch] $Pack,
[switch] $Publish,
[switch] $EnableSigning
[switch] $EnableSigning,
[switch] $BuildWhenEqual
)
enum VersionState {
Invalid
Expand Down Expand Up @@ -43,10 +44,10 @@ if ($null -eq $ManifestContent.ModuleVersion) {
if ($VersionState.Equals([VersionState]::Invalid)) {
Write-Error "The specified version in $ModulePrefix.$ModuleName module is either higher or lower than what's on $RepositoryName. Update 'ModuleVersion' in $AuthModulePath$AuthModuleManifest."
}
elseif ($VersionState.Equals([VersionState]::EqualToFeed)) {
elseif ($VersionState.Equals([VersionState]::EqualToFeed) -and !$BuildWhenEqual) {
Write-Warning "$ModulePrefix.$ModuleName module skipped. Version has not changed and is equal to what's on $RepositoryName."
}
elseif ($VersionState.Equals([VersionState]::Valid) -or $VersionState.Equals([VersionState]::NotOnFeed)) {
elseif ($VersionState.Equals([VersionState]::Valid) -or $VersionState.Equals([VersionState]::NotOnFeed) -or $BuildWhenEqual) {
$ModuleVersion = $VersionState.Equals([VersionState]::NotOnFeed) ? "0.1.1" : $ManifestContent.ModuleVersion
# Build and pack generated module.
if ($Build) {
Expand Down

0 comments on commit 5930fed

Please sign in to comment.