Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ jobs:
run: dotnet restore BitsKit.sln --locked-mode

- name: Build
run: dotnet build BitsKit.sln --configuration Release --no-restore
run: dotnet build BitsKit.sln --configuration Release --no-restore -p:Version=0.0.0-ci.${{ github.run_number }}

- name: Validate benchmark discovery
shell: pwsh
run: ./eng/Run-Benchmarks.ps1 -Filter '*' -List -NoRestore
run: ./eng/Run-Benchmarks.ps1 -Filter '*' -List -NoRestore -NoBuild

- name: Pack
run: dotnet pack BitsKit/BitsKit.csproj --configuration Release --no-build --no-restore --output artifacts -p:PackageVersion=0.0.0-ci.${{ github.run_number }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
run: dotnet pack BitsKit/BitsKit.csproj --configuration Release --no-build --no-restore --output artifacts -p:Version=0.0.0-ci.${{ github.run_number }} -p:PackageVersion=0.0.0-ci.${{ github.run_number }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg

- name: Inspect package
shell: pwsh
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
version:
description: Package version for a non-publishing dry run
required: true
default: 1.3.0-preview.1
default: 1.6.1-preview.1
type: string

permissions:
Expand Down Expand Up @@ -74,10 +74,10 @@ jobs:
run: dotnet restore BitsKit.sln --locked-mode

- name: Build
run: dotnet build BitsKit.sln --configuration Release --no-restore
run: dotnet build BitsKit.sln --configuration Release --no-restore -p:Version=${{ steps.version.outputs.version }}

- name: Build InlineArray consumer with modern compiler
run: dotnet build BitsKit.Tests/BitsKit.Tests.csproj --configuration Release --framework net10.0 --no-restore -p:LangVersion=preview
run: dotnet build BitsKit.Tests/BitsKit.Tests.csproj --configuration Release --framework net10.0 --no-restore -p:LangVersion=preview -p:Version=${{ steps.version.outputs.version }}

- name: Test .NET 8
run: dotnet test BitsKit.Tests/BitsKit.Tests.csproj --configuration Release --framework net8.0 --no-build
Expand All @@ -86,7 +86,7 @@ jobs:
run: dotnet test BitsKit.Tests/BitsKit.Tests.csproj --configuration Release --framework net10.0 --no-build

- name: Pack
run: dotnet pack BitsKit/BitsKit.csproj --configuration Release --no-build --no-restore --output artifacts -p:PackageVersion=${{ steps.version.outputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
run: dotnet pack BitsKit/BitsKit.csproj --configuration Release --no-build --no-restore --output artifacts -p:Version=${{ steps.version.outputs.version }} -p:PackageVersion=${{ steps.version.outputs.version }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg

- name: Inspect package
shell: pwsh
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Notable changes to the community-maintained fork are documented here. This proje

## Unreleased

## 1.6.1 - 2026-07-22

### Fixed

- Release builds now apply the tag-derived version to package, assembly, file, and informational metadata for every shipped DLL.
- Package validation rejects artifacts whose embedded DLL versions do not match the expected package version.

## 1.6.0 - 2026-07-22

### Added
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<VersionPrefix>1.3.0</VersionPrefix>
<VersionPrefix>1.6.1</VersionPrefix>
<Authors>barncastle;RejectKid</Authors>
<Description>BitsKit is a library for efficient bit-level reading and writing also adding bit field support.</Description>
<PackageTitle>BitsKit (community maintained)</PackageTitle>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This fork preserves the original public API while maintaining it for current .NE
Migrating from the original package normally requires only changing the package reference:

```xml
<PackageReference Include="RejectKid.BitsKit" Version="1.6.0" />
<PackageReference Include="RejectKid.BitsKit" Version="1.6.1" />
```

No namespace changes are required. Applications that still target .NET 6 or .NET 7 can consume the `netstandard2.1` asset when their target supports it, but those runtimes are no longer built or tested directly by this project.
Expand Down
4 changes: 4 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v1.6.1
- Apply the release version consistently to NuGet, assembly, file, and informational metadata.
- Validate every shipped DLL's embedded version before publishing a package.

v1.6.0
- Add opt-in unsafe generated accessors for callers that guarantee valid padded buffers.
- Add allocation-free contiguous and strided batch primitives plus generated batch accessors.
Expand Down
6 changes: 6 additions & 0 deletions eng/Run-Benchmarks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ param(

[switch] $NoRestore,

[switch] $NoBuild,

[switch] $List
)

Expand All @@ -39,6 +41,10 @@ if ($NoRestore) {
$arguments += '--no-restore'
}

if ($NoBuild) {
$arguments += '--no-build'
}

$arguments += @(
'--',
'--filter', $Filter,
Expand Down
52 changes: 52 additions & 0 deletions eng/Validate-Package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,58 @@ try {
throw "Expected package version '$ExpectedVersion', found '$($metadata.version)'."
}

if ($ExpectedVersion -notmatch '^(\d+)\.(\d+)\.(\d+)(?:-[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?$') {
throw "Expected version '$ExpectedVersion' is not a supported semantic version."
}

$expectedAssemblyVersion = "$($Matches[1]).$($Matches[2]).$($Matches[3]).0"
$assemblyEntries = @(
'analyzers/dotnet/cs/BitsKit.Generator.dll',
'lib/netstandard2.1/BitsKit.dll',
'lib/net8.0/BitsKit.dll',
'lib/net10.0/BitsKit.dll'
)
$temporaryDirectory = Join-Path ([System.IO.Path]::GetTempPath()) (
'bitskit-package-validation-' + [System.Guid]::NewGuid().ToString('N'))
[void] [System.IO.Directory]::CreateDirectory($temporaryDirectory)

try {
foreach ($entryName in $assemblyEntries) {
$assemblyEntry = $archive.GetEntry($entryName)
$temporaryAssembly = Join-Path $temporaryDirectory ($entryName.Replace('/', '_'))
$sourceStream = $assemblyEntry.Open()
$destinationStream = [System.IO.File]::Create($temporaryAssembly)

try {
$sourceStream.CopyTo($destinationStream)
}
finally {
$destinationStream.Dispose()
$sourceStream.Dispose()
}

$assemblyVersion = [System.Reflection.AssemblyName]::GetAssemblyName(
$temporaryAssembly).Version.ToString()
$fileVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($temporaryAssembly)

if ($assemblyVersion -ne $expectedAssemblyVersion) {
throw "Expected '$entryName' assembly version '$expectedAssemblyVersion', found '$assemblyVersion'."
}

if ($fileVersion.FileVersion -ne $expectedAssemblyVersion) {
throw "Expected '$entryName' file version '$expectedAssemblyVersion', found '$($fileVersion.FileVersion)'."
}

if ($fileVersion.ProductVersion -ne $ExpectedVersion -and
-not $fileVersion.ProductVersion.StartsWith("$ExpectedVersion+", [System.StringComparison]::Ordinal)) {
throw "Expected '$entryName' product version '$ExpectedVersion', found '$($fileVersion.ProductVersion)'."
}
}
}
finally {
[System.IO.Directory]::Delete($temporaryDirectory, $true)
}

if ($metadata.repository.url -ne 'https://github.com/RejectKid/BitsKit') {
throw "Unexpected repository URL '$($metadata.repository.url)'."
}
Expand Down
Loading