Skip to content

Commit 76a9981

Browse files
Update nuget config with nuget.local (#629)
* add nuget config * update comment * Update src/Microsoft.Azure.WebJobs.Extensions.Sql.csproj Co-authored-by: Charles Gagnon <[email protected]> Co-authored-by: Charles Gagnon <[email protected]>
1 parent d5cac14 commit 76a9981

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -365,4 +365,7 @@ __azurite_db*__.json
365365

366366
# Java build files
367367
repo/
368-
target/
368+
target/
369+
370+
# Local nupkg files
371+
local-packages/

Worker.Extensions.Sql/src/Microsoft.Azure.Functions.Worker.Extensions.Sql.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<RootNamespace>Microsoft.Azure.Functions.Worker.Extensions.Sql</RootNamespace>
66
<Description>Sql extension for .NET isolated Azure Functions</Description>
77
<Product>SQL Binding Worker</Product>
8-
<!--Version information-->
9-
<VersionPrefix>99.99.99</VersionPrefix>
10-
<SupportedVersion>1.*-*</SupportedVersion>
8+
<!-- Default Version for dev -->
9+
<Version>99.99.99</Version>
10+
<SupportedVersion>99.99.99</SupportedVersion>
1111
<PackageId>Microsoft.Azure.Functions.Worker.Extensions.Sql</PackageId>
1212
<PackageTags>Microsoft Azure WebJobs AzureFunctions Isolated DotnetIsolated SQL AzureSQL Worker</PackageTags>
1313
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>

nuget.config

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
44
<clear />
55
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
6+
<add key="nuget.local" value="./local-packages" />
67
</packageSources>
8+
9+
<!-- Define mappings by adding package patterns beneath the target source. -->
10+
<!-- Microsoft.Azure.WebJobs.Extensions.Sql package should be from nuget.local, everything else from
11+
nuget.org. -->
12+
<packageSourceMapping>
13+
<!-- key value for <packageSource> should match key values from <packageSources> element -->
14+
<packageSource key="nuget.local">
15+
<package pattern="Microsoft.Azure.WebJobs.Extensions.Sql" />
16+
</packageSource>
17+
<packageSource key="nuget.org">
18+
<package pattern="*" />
19+
</packageSource>
20+
</packageSourceMapping>
21+
722
</configuration>

src/Microsoft.Azure.WebJobs.Extensions.Sql.csproj

+7-1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,11 @@
3939
<None Include="..\lib\Microsoft.SqlServer.TransactSql.ScriptDom.dll" Pack="true" PackagePath="lib/$(TargetFramework)" />
4040
<None Include="..\README.md" Pack="true" PackagePath="" />
4141
</ItemGroup>
42-
42+
<Target Name="CopyNupkg" AfterTargets="Build">
43+
<ItemGroup>
44+
<_Packages Include=".\bin\$(Configuration)\*.nupkg" />
45+
</ItemGroup>
46+
<Copy SourceFiles="@(_Packages)" DestinationFolder="../local-packages" />
47+
<Message Text="Copied sql .nupkg to local-packages" Importance="high" />
48+
</Target>
4349
</Project>

0 commit comments

Comments
 (0)