Skip to content

Commit a9b53cc

Browse files
authored
Fixing missing source code package publishing. (#67)
1 parent 0565b6a commit a9b53cc

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ stages:
193193
condition: and(succeeded(), eq(variables['target'], 'x86_64-unknown-linux-gnu'))
194194
inputs:
195195
rootFolderOrFile: '$(Build.SourcesDirectory)'
196+
includeRootFolder: false
196197
archiveType: '7z'
197198
archiveFile: '$(Build.ArtifactStagingDirectory)/crate/rnp.source.7z'
198199

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

@@ -225,6 +227,7 @@ stages:
225227
condition: and(succeeded(), eq(variables['target'], 'x86_64-unknown-linux-gnu'))
226228
inputs:
227229
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/staging/crate'
230+
includeRootFolder: false
228231
archiveType: 'tar'
229232
tarCompression: 'gz'
230233
archiveFile: '$(Build.ArtifactStagingDirectory)/source/rnp.source.$(build.tag).tar.gz'
@@ -316,7 +319,7 @@ stages:
316319
#
317320
- task: PublishPipelineArtifact@1
318321
displayName: Publish pipeline artifact
319-
# condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
322+
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
320323
inputs:
321324
targetPath: '$(Build.ArtifactStagingDirectory)'
322325

build/pack/PackReleasePackages.ps1

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ function PackAllReleasePackages() {
1313
Write-Host "Pack all release packages: BuildBranch = $BuildBranchName, BuildTag = $BuildTag, BuildNumber = $BuildNumber"
1414

1515
PackPerFlavorReleases
16+
PackSourcePackagesForGithubRelease
1617
PackSymbolsPackagesForGithubRelease
1718
PackRustCrate
1819
PackChocolateyPackages
@@ -110,6 +111,14 @@ function PackPerFlavorReleases() {
110111
}
111112
}
112113

114+
# Pack source packages for github release.
115+
# The reason we are doing it is because we modify the version on the fly during our build process instead of
116+
# checking in into our code base, so only the build pipeline have the final source code package.
117+
function PackSourcePackagesForGithubRelease() {
118+
Write-Host "Publish source packages to .\Releases\GithubReleases"
119+
Copy-Item -Path .\Build.Build.linuxx64\source\* .\Releases\GithubReleases -Verbose -Force
120+
}
121+
113122
# Pack symbols for github release
114123
function PackSymbolsPackagesForGithubRelease() {
115124
$symbolsZipFilePath = ".\Releases\GithubReleases\rnp.$BuildTag.symbols.zip"
@@ -124,11 +133,6 @@ function PackRustCrate() {
124133
Copy-Item -Path .\Build.Build.linuxx64\crate\* .\Releases\Crate.io -Verbose -Force
125134
}
126135

127-
function PackSourcePackages() {
128-
Write-Host "Publish source packages to .\Releases\GithubReleases"
129-
Copy-Item -Path .\Build.Build.linuxx64\source\* .\Releases\GithubReleases -Verbose -Force
130-
}
131-
132136
# Chocolatey
133137
function PackChocolateyPackages() {
134138
New-Item -ItemType Directory -Path ".\Releases\Chocolatey"

0 commit comments

Comments
 (0)