File tree Expand file tree Collapse file tree 18 files changed +68
-33
lines changed
AOT_Logging/src/AOT_Logging
AOT_Metrics/src/AOT_Metrics
AOT_Tracing/src/AOT_Tracing
BatchProcessing/src/HelloWorld
Event Handler/BedrockAgentFunction/src
Idempotency/src/HelloWorld
Parameters/src/HelloWorld
ServerlessApi/src/LambdaPowertoolsAPI Expand file tree Collapse file tree 18 files changed +68
-33
lines changed Original file line number Diff line number Diff line change @@ -92,10 +92,18 @@ jobs:
9292 packageName=$(basename $package .nupkg | sed -E 's/(.*)\.([0-9]+\.[0-9]+\.[0-9]+.*)$/\1/')
9393 packageVersion=$(basename $package .nupkg | sed -E 's/(.*)\.([0-9]+\.[0-9]+\.[0-9]+.*)$/\2/')
9494
95- # Check if project references this package
95+ # Check if project references this package via PackageReference
9696 if grep -q "<PackageReference.*Include=\"$packageName\"" "$project"; then
97- echo " - Updating $packageName to version $packageVersion"
98- # Use --no-restore to avoid restoring during each add
97+ echo " - Updating PackageReference $packageName to version $packageVersion"
98+ dotnet add "$project" package "$packageName" --version "$packageVersion" --source "local" --no-restore
99+ fi
100+
101+ # Check if project references this package via ProjectReference and convert to PackageReference
102+ if grep -q "<ProjectReference.*$packageName\.csproj" "$project"; then
103+ echo " - Converting ProjectReference $packageName to PackageReference version $packageVersion"
104+ # Remove the ProjectReference line
105+ sed -i "/<ProjectReference.*$packageName\.csproj/d" "$project"
106+ # Add PackageReference
99107 dotnet add "$project" package "$packageName" --version "$packageVersion" --source "local" --no-restore
100108 fi
101109 done
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ public partial class LambdaFunctionJsonSerializerContext : JsonSerializerContext
173173
174174 <ItemGroup >
175175 <PackageReference Include =" Amazon.Lambda.RuntimeSupport" Version =" 1.12.0" />
176- <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.5 .0" />
176+ <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.8 .0" />
177177 <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.4.4" />
178178 <PackageReference Include =" AWS.Lambda.Powertools.Logging" Version =" 2.0.0" />
179179 </ItemGroup >
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ Migrate from AWS SDK v3 to v4. Update package references in your `.csproj`:
5656** After (v3):**
5757``` xml
5858<ItemGroup >
59- <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.7 .0" />
59+ <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.8 .0" />
6060 <PackageReference Include =" AWSSDK.Core" Version =" 4.0.*" />
6161 <PackageReference Include =" AWSSDK.DynamoDBv2" Version =" 4.0.*" />
6262 <PackageReference Include =" AWSSDK.S3" Version =" 4.0.*" />
Original file line number Diff line number Diff line change 2020 <PackageReference Include =" Amazon.Lambda.RuntimeSupport" Version =" 1.14.1" />
2121 <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.8.0" />
2222 <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.4.4" />
23- <PackageReference Include =" AWS.Lambda.Powertools.Logging" Version =" 3.0.2" />
23+ </ItemGroup >
24+ <ItemGroup >
25+ <ProjectReference Include =" ..\..\..\..\..\libraries\src\AWS.Lambda.Powertools.Logging\AWS.Lambda.Powertools.Logging.csproj" />
2426 </ItemGroup >
2527</Project >
Original file line number Diff line number Diff line change 2020 <PackageReference Include =" Amazon.Lambda.RuntimeSupport" Version =" 1.14.1" />
2121 <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.8.0" />
2222 <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.4.4" />
23- <PackageReference Include =" AWS.Lambda.Powertools.Metrics" Version =" 3.0.2" />
23+ </ItemGroup >
24+ <ItemGroup >
25+ <ProjectReference Include =" ..\..\..\..\..\libraries\src\AWS.Lambda.Powertools.Metrics\AWS.Lambda.Powertools.Metrics.csproj" />
2426 </ItemGroup >
2527</Project >
Original file line number Diff line number Diff line change 2020 <PackageReference Include =" Amazon.Lambda.RuntimeSupport" Version =" 1.14.1" />
2121 <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.8.0" />
2222 <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.4.4" />
23- <PackageReference Include =" AWS.Lambda.Powertools.Tracing" Version =" 3.0.2" />
23+ </ItemGroup >
24+ <ItemGroup >
25+ <ProjectReference Include =" ..\..\..\..\..\libraries\src\AWS.Lambda.Powertools.Tracing\AWS.Lambda.Powertools.Tracing.csproj" />
2426 </ItemGroup >
2527</Project >
Original file line number Diff line number Diff line change 77 <ItemGroup >
88 <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.8.0" />
99 <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.4.4" />
10- <!-- <PackageReference Include="AWS.Lambda.Powertools.BatchProcessing" Version="3.0.0" />-->
11- <PackageReference Include =" AWS.Lambda.Powertools.Logging" Version =" 3.0.0" />
1210 <PackageReference Include =" Microsoft.Extensions.DependencyInjection" Version =" 8.0.1" />
1311 </ItemGroup >
1412 <ItemGroup >
15- <ProjectReference Include =" ..\..\..\..\libraries\src\AWS.Lambda.Powertools.BatchProcessing\AWS.Lambda.Powertools.BatchProcessing.csproj" />
13+ <ProjectReference Include =" ..\..\..\..\libraries\src\AWS.Lambda.Powertools.BatchProcessing\AWS.Lambda.Powertools.BatchProcessing.csproj" />
14+ <ProjectReference Include =" ..\..\..\..\libraries\src\AWS.Lambda.Powertools.Logging\AWS.Lambda.Powertools.Logging.csproj" />
1615 </ItemGroup >
1716</Project >
Original file line number Diff line number Diff line change 1313 </PropertyGroup >
1414 <ItemGroup >
1515 <PackageReference Include =" Amazon.Lambda.RuntimeSupport" Version =" 1.12.0" />
16- <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.5 .0" />
16+ <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.8 .0" />
1717 <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.4.4" />
18- <PackageReference Include =" AWS.Lambda.Powertools.EventHandler.Resolvers.BedrockAgentFunction" Version =" 1.0.0-alpha.3" />
1918 <PackageReference Include =" AWSSDK.GeoPlaces" Version =" 4.0.0.4" />
20- <PackageReference Include =" AWS.Lambda.Powertools.Logging" Version =" 2.0.0" />
19+ </ItemGroup >
20+ <ItemGroup >
21+ <ProjectReference Include =" ..\..\..\..\..\libraries\src\AWS.Lambda.Powertools.EventHandler.Resolvers.BedrockAgentFunction\AWS.Lambda.Powertools.EventHandler.Resolvers.BedrockAgentFunction.csproj" />
22+ <ProjectReference Include =" ..\..\..\..\..\libraries\src\AWS.Lambda.Powertools.Logging\AWS.Lambda.Powertools.Logging.csproj" />
2123 </ItemGroup >
2224</Project >
Original file line number Diff line number Diff line change 88 <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.8.0" />
99 <PackageReference Include =" Amazon.Lambda.APIGatewayEvents" Version =" 2.7.3" />
1010 <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.4.4" />
11- <PackageReference Include =" AWS.Lambda.Powertools.Idempotency" Version =" 3.0.2" />
12- <PackageReference Include =" AWS.Lambda.Powertools.Logging" Version =" 3.0.2" />
11+ </ItemGroup >
12+ <ItemGroup >
13+ <ProjectReference Include =" ..\..\..\..\libraries\src\AWS.Lambda.Powertools.Idempotency\AWS.Lambda.Powertools.Idempotency.csproj" />
14+ <ProjectReference Include =" ..\..\..\..\libraries\src\AWS.Lambda.Powertools.Logging\AWS.Lambda.Powertools.Logging.csproj" />
1315 </ItemGroup >
1416</Project >
Original file line number Diff line number Diff line change 1818 <PackageReference Include =" Amazon.Lambda.RuntimeSupport" Version =" 1.14.1" />
1919 <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.8.0" />
2020 <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.4.4" />
21- <PackageReference Include =" AWS.Lambda.Powertools.Logging" Version =" 3.0.2" />
22- <PackageReference Include =" AWS.Lambda.Powertools.Kafka.Avro" Version =" 3.0.2" />
21+ </ItemGroup >
22+ <ItemGroup >
23+ <ProjectReference Include =" ..\..\..\..\libraries\src\AWS.Lambda.Powertools.Logging\AWS.Lambda.Powertools.Logging.csproj" />
24+ <ProjectReference Include =" ..\..\..\..\libraries\src\AWS.Lambda.Powertools.Kafka.Avro\AWS.Lambda.Powertools.Kafka.Avro.csproj" />
2325 </ItemGroup >
2426 <Target Name =" GenerateAvroClasses" BeforeTargets =" CoreCompile" >
2527 <Exec Command =" avrogen -s $(ProjectDir)CustomerProfile.avsc $(ProjectDir)Generated" />
You can’t perform that action at this time.
0 commit comments