Skip to content

Commit

Permalink
refactor(shim): Remove CS shim codebase (#5903)
Browse files Browse the repository at this point in the history
  • Loading branch information
niheaven authored Apr 18, 2024
1 parent 98cf8ae commit fa06e92
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 279 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
- **core:** Cleanup some old codes, e.g., msi section and config migration ([#5715](https://github.com/ScoopInstaller/Scoop/issues/5715), [#5824](https://github.com/ScoopInstaller/Scoop/issues/5824))
- **core:** Rewrite and separate path-related functions to `system.ps1` ([#5836](https://github.com/ScoopInstaller/Scoop/issues/5836), [#5858](https://github.com/ScoopInstaller/Scoop/issues/5858), [#5864](https://github.com/ScoopInstaller/Scoop/issues/5864))
- **core:** Get rid of 'fullpath' ([#3533](https://github.com/ScoopInstaller/Scoop/issues/3533))
- **shim:** Remove CS shim codebase ([#5903](https://github.com/ScoopInstaller/Scoop/issues/5903))

### Builds

Expand Down
13 changes: 6 additions & 7 deletions lib/core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -979,13 +979,12 @@ function shim($path, $global, $name, $arg) {
}

function get_shim_path() {
$shim_path = "$(versiondir 'scoop' 'current')\supporting\shims\kiennq\shim.exe"
$shim_version = get_config SHIM 'default'
switch ($shim_version) {
'71' { $shim_path = "$(versiondir 'scoop' 'current')\supporting\shims\71\shim.exe"; Break }
'scoopcs' { $shim_path = "$(versiondir 'scoop' 'current')\supporting\shimexe\bin\shim.exe"; Break }
'kiennq' { Break } # for backward compatibility
'default' { Break }
$shim_version = get_config SHIM 'kiennq'
$shim_path = switch ($shim_version) {
'scoopcs' { "$(versiondir 'scoop' 'current')\supporting\shims\scoopcs\shim.exe" }
'71' { "$(versiondir 'scoop' 'current')\supporting\shims\71\shim.exe" }
'kiennq' { "$(versiondir 'scoop' 'current')\supporting\shims\kiennq\shim.exe" }
'default' { "$(versiondir 'scoop' 'current')\supporting\shims\scoopcs\shim.exe" }
default { warn "Unknown shim version: '$shim_version'" }
}
return $shim_path
Expand Down
1 change: 0 additions & 1 deletion supporting/shimexe/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion supporting/shimexe/bin/checksum.sha256

This file was deleted.

1 change: 0 additions & 1 deletion supporting/shimexe/bin/checksum.sha512

This file was deleted.

Binary file removed supporting/shimexe/bin/shim.exe
Binary file not shown.
22 changes: 0 additions & 22 deletions supporting/shimexe/build.ps1

This file was deleted.

8 changes: 0 additions & 8 deletions supporting/shimexe/install.ps1

This file was deleted.

5 changes: 0 additions & 5 deletions supporting/shimexe/packages.config

This file was deleted.

179 changes: 0 additions & 179 deletions supporting/shimexe/shim.cs

This file was deleted.

43 changes: 0 additions & 43 deletions supporting/shimexe/shim.csproj

This file was deleted.

10 changes: 0 additions & 10 deletions supporting/shimexe/update.ps1

This file was deleted.

1 change: 1 addition & 0 deletions supporting/shims/scoopcs/checksum.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0116068768fc992fc536738396b33db3dafe6b0cf0e6f54f6d1aa8b0331f3cec *shim.exe
1 change: 1 addition & 0 deletions supporting/shims/scoopcs/checksum.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d734c528e9f20581ed3c7aa71a458f7dff7e2780fa0c319ccb9c813cd8dbf656bd7e550b81d2aa3ee8775bff9a4e507bc0b25f075697405adca0f47d37835848 *shim.exe
Binary file added supporting/shims/scoopcs/shim.exe
Binary file not shown.
1 change: 1 addition & 0 deletions supporting/shims/scoopcs/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.0
3 changes: 1 addition & 2 deletions test/Scoop-00File.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ BeforeDiscovery {
'[\\/]\.git[\\/]',
'\.sublime-workspace$',
'\.DS_Store$',
'supporting(\\|/)validator(\\|/)packages(\\|/)*',
'supporting(\\|/)shimexe(\\|/)packages(\\|/)*'
'supporting(\\|/)validator(\\|/)packages(\\|/)*'
)
$repo_files = (Get-ChildItem $TestPath -File -Recurse).FullName |
Where-Object { $_ -inotmatch $($project_file_exclusions -join '|') }
Expand Down

0 comments on commit fa06e92

Please sign in to comment.