Skip to content

Commit

Permalink
Fixing missing source code package publishing. (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f authored Jul 30, 2021
1 parent 0565b6a commit a9b53cc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
5 changes: 4 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ stages:
condition: and(succeeded(), eq(variables['target'], 'x86_64-unknown-linux-gnu'))
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)'
includeRootFolder: false
archiveType: '7z'
archiveFile: '$(Build.ArtifactStagingDirectory)/crate/rnp.source.7z'

Expand All @@ -217,6 +218,7 @@ stages:
condition: and(succeeded(), eq(variables['target'], 'x86_64-unknown-linux-gnu'))
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/staging/crate'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/source/rnp.source.$(build.tag).zip'

Expand All @@ -225,6 +227,7 @@ stages:
condition: and(succeeded(), eq(variables['target'], 'x86_64-unknown-linux-gnu'))
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/staging/crate'
includeRootFolder: false
archiveType: 'tar'
tarCompression: 'gz'
archiveFile: '$(Build.ArtifactStagingDirectory)/source/rnp.source.$(build.tag).tar.gz'
Expand Down Expand Up @@ -316,7 +319,7 @@ stages:
#
- task: PublishPipelineArtifact@1
displayName: Publish pipeline artifact
# condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'

Expand Down
14 changes: 9 additions & 5 deletions build/pack/PackReleasePackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function PackAllReleasePackages() {
Write-Host "Pack all release packages: BuildBranch = $BuildBranchName, BuildTag = $BuildTag, BuildNumber = $BuildNumber"

PackPerFlavorReleases
PackSourcePackagesForGithubRelease
PackSymbolsPackagesForGithubRelease
PackRustCrate
PackChocolateyPackages
Expand Down Expand Up @@ -110,6 +111,14 @@ function PackPerFlavorReleases() {
}
}

# Pack source packages for github release.
# The reason we are doing it is because we modify the version on the fly during our build process instead of
# checking in into our code base, so only the build pipeline have the final source code package.
function PackSourcePackagesForGithubRelease() {
Write-Host "Publish source packages to .\Releases\GithubReleases"
Copy-Item -Path .\Build.Build.linuxx64\source\* .\Releases\GithubReleases -Verbose -Force
}

# Pack symbols for github release
function PackSymbolsPackagesForGithubRelease() {
$symbolsZipFilePath = ".\Releases\GithubReleases\rnp.$BuildTag.symbols.zip"
Expand All @@ -124,11 +133,6 @@ function PackRustCrate() {
Copy-Item -Path .\Build.Build.linuxx64\crate\* .\Releases\Crate.io -Verbose -Force
}

function PackSourcePackages() {
Write-Host "Publish source packages to .\Releases\GithubReleases"
Copy-Item -Path .\Build.Build.linuxx64\source\* .\Releases\GithubReleases -Verbose -Force
}

# Chocolatey
function PackChocolateyPackages() {
New-Item -ItemType Directory -Path ".\Releases\Chocolatey"
Expand Down

0 comments on commit a9b53cc

Please sign in to comment.