File tree Expand file tree Collapse file tree 5 files changed +14
-2
lines changed
Expand file tree Collapse file tree 5 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 4747 with :
4848 context : .
4949 file : ./src/BuslyCLI.Console/Dockerfile
50+ build-args : |
51+ APP_VERSION=${{ inputs.version }}
5052 push : true
5153 tags : ${{ steps.meta.outputs.tags }}
5254 labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -27,9 +27,12 @@ Task("Compile")
2727 . IsDependentOn ( "Clean" )
2828 . Does ( ( ) =>
2929{
30+ var msBuildSettings = new DotNetMSBuildSettings ( )
31+ . WithProperty ( "InformationalVersion" , version ) ;
3032 DotNetBuild ( solution , new DotNetBuildSettings
3133 {
3234 Configuration = configuration ,
35+ MSBuildSettings = msBuildSettings ,
3336 } ) ;
3437} ) ;
3538
Original file line number Diff line number Diff line change 1414 <PackageIcon >busly-logo-128x128.png</PackageIcon >
1515 <RepositoryUrl >https://github.com/TraGicCode/busly-cli</RepositoryUrl >
1616 <RepositoryType >git</RepositoryType >
17+ <InformationalVersion >0.1.0</InformationalVersion >
18+ <IncludeSourceRevisionInInformationalVersion >false</IncludeSourceRevisionInInformationalVersion >
1719 </PropertyGroup >
1820
1921 <ItemGroup >
Original file line number Diff line number Diff line change 11# Use .NET 9 SDK to build
22FROM mcr.microsoft.com/dotnet/sdk:10.0.100 AS build
3+
4+ ARG APP_VERSION=0.1.0
35WORKDIR /src
46
57COPY Directory.Build.props ./
@@ -21,7 +23,8 @@ RUN dotnet publish "./BuslyCLI.Console/BuslyCLI.Console.csproj" \
2123 -p:PublishTrimmed=true \
2224 -p:TrimMode=partial \
2325 -p:EnableCompressionInSingleFile=true \
24- -p:SelfContained=true
26+ -p:SelfContained=true \
27+ -p:InformationalVersion=$APP_VERSION
2528
2629# Use minimal runtime for smaller image size
2730FROM mcr.microsoft.com/dotnet/runtime-deps:10.0-alpine AS final
Original file line number Diff line number Diff line change 1+ using System . Reflection ;
12using BuslyCLI . Commands . Command ;
23using BuslyCLI . Commands . Demo ;
34using BuslyCLI . Commands . Event ;
@@ -14,7 +15,8 @@ public static Action<IConfigurator> GetSpectreCommandConfiguration()
1415 {
1516 config . SetApplicationName ( "busly" ) ;
1617 // TODO: Allow this to get set via the CLI version
17- config . SetApplicationVersion ( "1.0.0" ) ;
18+ var assembly = Assembly . GetExecutingAssembly ( ) . GetCustomAttribute < AssemblyInformationalVersionAttribute > ( ) ;
19+ config . SetApplicationVersion ( assembly . InformationalVersion ) ;
1820 config . AddBranch ( "transport" , transport =>
1921 {
2022 transport . SetDescription ( "Manage transport configurations." ) ;
You can’t perform that action at this time.
0 commit comments