Skip to content

Commit

Permalink
Bumping build image to dotnet 7 (#127)
Browse files Browse the repository at this point in the history
* Bump Microsoft.Extensions.DependencyInjection.Abstractions

Bumps [Microsoft.Extensions.DependencyInjection.Abstractions](https://github.com/dotnet/runtime) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/commits)

---
updated-dependencies:
- dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bumping build image to dotnet 7

* Using env variables to msbuild, as of microsoft/vstest#4014

* Correcting .dockerignore file

* Staying at net6.0, bumping dependencies and releasing new patch version

* removed comma from TargetFramework

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
andmos and dependabot[bot] authored Nov 10, 2022
1 parent ed9f6ca commit 6de54f2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
12 changes: 8 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
bin/
obj/
out/
TestResults/
# directories
**/bin/
**/obj/
**/out/

# files
Dockerfile*
**/*.md
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0.402-bullseye-slim as builder
FROM mcr.microsoft.com/dotnet/sdk:7.0.100-bullseye-slim as builder

ARG VERSION_SUFFIX

Expand All @@ -9,8 +9,15 @@ COPY .git .git

COPY src/ .

# MSBuild arguments
ENV CollectCoverage=true
ENV CoverletOutputFormat=opencover
ENV Threshold=80
ENV ThresholdType=line
ENV ExcludeByAttribute=ExcludeFromCodeCoverageAttribute

RUN dotnet restore BikeshareClient/

RUN dotnet test BikeshareClient/TestBikeshareClient/TestBikeshareClient.csproj /p:CollectCoverage=true /p:Threshold=80 /p:ThresholdType=line /p:CoverletOutputFormat=opencover /p:ExcludeByAttribute=ExcludeFromCodeCoverageAttribute
RUN dotnet test BikeshareClient/TestBikeshareClient/TestBikeshareClient.csproj

RUN dotnet pack BikeshareClient/ -c Release -o output $VERSION_SUFFIX
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services.AddBikeshareClient("http://gbfs.urbansharing.com/trondheim/gbfs.json");
Simple build:

```bash
docker run --rm -it -v $(pwd):/app mcr.microsoft.com/dotnet/sdk:6.0 dotnet pack app/src/BikeshareClient -o /app
docker run --rm -it -v $(pwd):/app mcr.microsoft.com/dotnet/sdk:7.0 dotnet pack app/src/BikeshareClient -o /app
```

Run test script:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ReleaseVersion>3.3.5</ReleaseVersion>
<VersionPrefix>3.3.5</VersionPrefix>
<ReleaseVersion>3.3.6</ReleaseVersion>
<VersionPrefix>3.3.6</VersionPrefix>
<Title>BikeshareClient.DependencyInjection</Title>
<Authors>andmos</Authors>
<Description>
Expand All @@ -19,7 +19,7 @@

<ItemGroup>
<PackageReference Include="BikeshareClient" Version="3.3.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>

<IsPackable>false</IsPackable>
<ReleaseVersion>1.0.1</ReleaseVersion>
Expand Down

0 comments on commit 6de54f2

Please sign in to comment.