Skip to content

Commit

Permalink
Update release scripts use preview version to test deplyoment
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Omondi committed Jul 8, 2024
1 parent fc11a4f commit ab23f32
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
26 changes: 13 additions & 13 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,16 @@ extends:
arguments: '-projectPath "$(Build.SourcesDirectory)/Directory.Build.props"'
pwsh: true
enabled: true


- task: PowerShell@2
displayName: 'Validate project version has been incremented'
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
inputs:
targetType: 'filePath'
filePath: $(System.DefaultWorkingDirectory)\scripts\ValidateProjectVersionUpdated.ps1
arguments: '-projectPath "$(Build.SourcesDirectory)/Directory.Build.props" -packageName "Microsoft.Kiota.Abstractions"'
pwsh: true

# Install the nuget tool.
- task: NuGetToolInstaller@1
displayName: 'Install Nuget dependency manager'
Expand Down Expand Up @@ -158,15 +167,6 @@ extends:
BUILD_CONFIGURATION: $(BuildConfiguration)
displayName: Dotnet pack

- task: PowerShell@2
displayName: 'Validate project version has been incremented'
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
inputs:
targetType: 'filePath'
filePath: $(System.DefaultWorkingDirectory)\scripts\ValidateProjectVersionUpdated.ps1
arguments: '-projectPath "$(Build.SourcesDirectory)/Directory.Build.props" -packageName "Microsoft.Kiota.Abstractions"'
pwsh: true

- task: EsrpCodeSigning@3
displayName: 'ESRP CodeSigning Nuget Packages'
inputs:
Expand Down Expand Up @@ -212,7 +212,7 @@ extends:
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
dependsOn: build
jobs:
- deployment: deploy_dotnet_abstractions
- deployment: deploy_dotnet_kiota_libs
dependsOn: []
environment: nuget-org
strategy:
Expand Down Expand Up @@ -240,10 +240,10 @@ extends:
pwsh: true
arguments: '-packageDirPath "$(Pipeline.Workspace)/"'
- task: 1ES.PublishNuget@1
displayName: 'NuGet push'
displayName: 'Push Nuget for Kiota libraries'
inputs:
command: push
packagesToPush: '$(Pipeline.Workspace)/Microsoft.Kiota.Abstractions.*.nupkg'
packagesToPush: '$(Pipeline.Workspace)/Microsoft.Kiota.*.nupkg'
packageParentPath: '$(Pipeline.Workspace)'
nuGetFeedType: external
publishFeedCredentials: 'Kiota Nuget Connection'
Expand Down
5 changes: 2 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Project>
<!-- Common default project properties for ALL projects-->
<PropertyGroup>
<VersionPrefix>2.0.0</VersionPrefix>
<VersionSuffix>
</VersionSuffix>
<VersionPrefix>1.9.8</VersionPrefix>
<VersionSuffix>preview</VersionSuffix>
<!-- This is overidden in test projects by setting to true-->
<IsTestProject>false</IsTestProject>
<!-- This is overidden in test projects by setting to true-->
Expand Down
2 changes: 1 addition & 1 deletion scripts/GetNugetPackageVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Param(

Write-Host "Get the NuGet package version and set it in the global variable: VERSION_STRING" -ForegroundColor Magenta

$nugetPackageName = (Get-ChildItem (Join-Path $packageDirPath *.nupkg) -Exclude *.symbols.nupkg).Name
$nugetPackageName = Get-ChildItem (Join-Path $packageDirPath "Microsoft.Kiota.Abstractions*.nupkg")

Write-Host "Found NuGet package: $nugetPackageName" -ForegroundColor Magenta

Expand Down

0 comments on commit ab23f32

Please sign in to comment.