Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Commit b8fea41

Browse files
authored
SourceLink support (#133)
* sourcelink + snupkg support * remove double condition
1 parent c02796b commit b8fea41

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

Source/LinqToDB.EntityFrameworkCore/linq2db.EntityFrameworkCore.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,20 @@
1616
<LangVersion>latest</LangVersion>
1717
</PropertyGroup>
1818

19+
<PropertyGroup Condition="'$(Configuration)'=='Release'">
20+
<DebugType>portable</DebugType>
21+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
22+
<DebugSymbols>true</DebugSymbols>
23+
</PropertyGroup>
24+
1925
<ItemGroup>
2026
<PackageReference Include="linq2db" Version="3.3.0" />
2127
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.2" />
28+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
29+
<PrivateAssets>all</PrivateAssets>
30+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
31+
</PackageReference>
32+
2233
</ItemGroup>
2334

2435
</Project>

azure-pipelines.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,37 +43,48 @@ stages:
4343
inputs:
4444
solution: '$(solution)'
4545
configuration: '$(build_configuration)'
46-
msbuildArguments: '/t:Restore;Rebuild -m'
46+
msbuildArguments: '/t:Restore;Rebuild -m /p:ContinuousIntegrationBuild=true'
4747
displayName: Build Solution
4848

4949
- powershell: echo "##vso[task.setvariable variable=packageVersion]$(packageVersion)-rc.$(Build.BuildId)"
50-
condition: ne(variables['Build.SourceBranchName'], 'release')
5150
displayName: Set nuget RC version for non-release branch
51+
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))
5252

5353
- task: PowerShell@2
5454
inputs:
5555
filePath: '$(Build.SourcesDirectory)/NuGet/BuildNuspecs.ps1'
5656
workingDirectory: '$(Build.SourcesDirectory)'
5757
arguments: -path $(Build.SourcesDirectory)/NuGet/linq2db.EntityFrameworkCore.nuspec -version $(packageVersion) -branch $(Build.SourceBranchName)
5858
displayName: Generate nuspec
59+
condition: and(succeeded(), or(eq(variables['Build.SourceBranchName'], 'release'), eq(variables['Build.SourceBranchName'], 'master')))
5960

6061
- task: NuGetToolInstaller@0
6162
inputs:
6263
versionSpec: '5.x'
6364
workingDirectory: $(Build.SourcesDirectory)/NuGet
6465
displayName: Install nuget
66+
condition: and(succeeded(), or(eq(variables['Build.SourceBranchName'], 'release'), eq(variables['Build.SourceBranchName'], 'master')))
6567

6668
- task: CmdLine@2
6769
inputs:
6870
script: 'nuget Pack linq2db.EntityFrameworkCore.nuspec -OutputDirectory built'
6971
workingDirectory: $(Build.SourcesDirectory)/NuGet
70-
displayName: Build nuget
72+
displayName: Build nuget (azure artifacts)
73+
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))
74+
75+
- task: CmdLine@2
76+
inputs:
77+
script: 'nuget Pack linq2db.EntityFrameworkCore.nuspec -OutputDirectory built -Symbols -SymbolPackageFormat snupkg'
78+
workingDirectory: $(Build.SourcesDirectory)/NuGet
79+
displayName: Build nuget (nuget.org)
80+
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'release'))
7181

7282
- task: PublishBuildArtifacts@1
7383
inputs:
7484
pathToPublish: '$(Build.SourcesDirectory)/NuGet/built'
7585
artifactName: '$(artifact_nugets)'
7686
displayName: Publish nugets to artifacts
87+
condition: and(succeeded(), or(eq(variables['Build.SourceBranchName'], 'release'), eq(variables['Build.SourceBranchName'], 'master')))
7788

7889
- task: NuGetCommand@2
7990
inputs:

0 commit comments

Comments
 (0)