Skip to content

Commit

Permalink
add version number to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
AbundantSalmon committed Jan 26, 2025
1 parent da5b068 commit f540313
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/add_version_number_to_cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: patch
---

# add version number to cli
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Extract version from package.json
id: get_version
run: echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV
- name: Build for Apple Silicon
run: |
dotnet publish -c Release -r osx-arm64 --self-contained -o osx-arm64 -p:AssemblyName=qc-osx-arm64
dotnet publish -c Release -r osx-arm64 --self-contained -o osx-arm64 -p:AssemblyName=qc-osx-arm64 -p:Version=$VERSION
- name: Build for Intel Macs
run: |
dotnet publish -c Release -r osx-x64 --self-contained -o osx-x64 -p:AssemblyName=qc-osx-x64
dotnet publish -c Release -r osx-x64 --self-contained -o osx-x64 -p:AssemblyName=qc-osx-x64 -p:Version=$VERSION
- name: Create Universal Binary
run: |
mkdir universal
Expand Down
1 change: 1 addition & 0 deletions QuickCapacities/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public static int Main(string[] args)
config.AddCommand<ShowConfigCommand>("show-config");
config.AddCommand<SetConfigCommand>("set-config");
config.AddCommand<SearchCommand>("search");
config.UseAssemblyInformationalVersion();
});
return app.Run(args);
}
Expand Down
7 changes: 4 additions & 3 deletions QuickCapacities/QuickCapacities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
<Nullable>enable</Nullable>
<RootNamespace>QuickCapacities</RootNamespace>
<PublishSingleFile>true</PublishSingleFile>
<Version>0.0.1</Version> <!-- Default version fallback -->
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageReference Include="Spectre.Console" Version="0.49.1" />
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0"/>
<PackageReference Include="Spectre.Console" Version="0.49.1"/>
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1"/>
</ItemGroup>

</Project>

0 comments on commit f540313

Please sign in to comment.