Skip to content

Commit f000bd3

Browse files
authored
Merge pull request #14: commit the strong-name key
Key.snk is tracked so every build has the same assembly identity.
2 parents 803ca5d + 3fa27ec commit f000bd3

6 files changed

Lines changed: 4 additions & 14 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
runs-on: windows-latest
2222
outputs:
2323
version: ${{ steps.version.outputs.version }}
24-
env:
25-
SNK_BASE64: ${{ secrets.SNK_BASE64 }}
2624
steps:
2725
- uses: actions/checkout@v7
2826

@@ -43,11 +41,6 @@ jobs:
4341
if (-not (Select-String -Path 'CHANGELOG.txt' -SimpleMatch "SourceControlSwitcher - v$version" -Quiet)) { throw "CHANGELOG.txt has no section for v$version" }
4442
"version=$version" >> $env:GITHUB_OUTPUT
4543
46-
- name: Restore strong-name key
47-
if: env.SNK_BASE64 != ''
48-
shell: pwsh
49-
run: '[IO.File]::WriteAllBytes("$PWD/Key.snk", [Convert]::FromBase64String($env:SNK_BASE64))'
50-
5144
- name: Build
5245
run: msbuild SourceControlSwitcher.slnx -restore -p:Configuration=Release -p:DeployExtension=false -v:minimal
5346

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
development/
88
dist/*
9-
Key.snk
109

1110

1211
# User-specific files

‎BUILD.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Open SourceControlSwitcher.slnx and build (Ctrl+Shift+B), or from a Developer Co
1515

1616
The VSIX is written to target\Release\SourceControlSwitcher.vsix.
1717

18-
Key.snk (the strong-name key) is not in the repository: a local one is generated on the first build.
18+
Key.snk is the strong-name key of the assembly. It is committed on purpose, as Microsoft recommends for
19+
open-source projects: a strong name provides identity, not security.
1920

2021
Tests
2122
-----

‎CHANGELOG.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ SourceControlSwitcher - v1.2.0
1717
VisualHG, VSHG, HgSccPackage (Mercurial support).
1818
* Solution migrated to .slnx; unit tests added.
1919
* Icon redrawn from the vector logo; Getting Started link in the extension details.
20-
* Extension description localized in Italian, French and German (shown in Manage Extensions). Builds, tests and releases now run
20+
* Extension description localized in Italian, French and German (shown in Manage Extensions).
21+
* The strong-name key (Key.snk) is now in the repository, so every build has the same assembly identity. Builds, tests and releases now run
2122
on GitHub Actions (CI on every push and pull request; tag vX.Y.Z publishes to the Marketplace).
2223

2324
SourceControlSwitcher - v1.1.2

‎Key.snk‎

596 Bytes
Binary file not shown.

‎SourceControlSwitcher/SourceControlSwitcher.csproj‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,4 @@
142142
</ItemGroup>
143143
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
144144
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
145-
<!-- Key.snk is not committed: generate a local one when missing, wherever the project is built from. -->
146-
<Target Name="EnsureStrongNameKey" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)\..\Key.snk')">
147-
<Exec Command="&quot;$(TargetFrameworkSDKToolsDirectory)sn.exe&quot; -k &quot;$(MSBuildProjectDirectory)\..\Key.snk&quot;" />
148-
</Target>
149145
</Project>

0 commit comments

Comments
 (0)