Skip to content

Commit

Permalink
Revert "perf(shim): Update kiennq-shim to v3.1 (ScoopInstaller#5841)"
Browse files Browse the repository at this point in the history
  • Loading branch information
brian6932 committed Mar 24, 2024
1 parent 2f44f44 commit 6f4125b
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 4 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Expand Up @@ -51,7 +51,6 @@

- **decompress:** Disable progress bar to improve `Expand-Archive` performance ([#5410](https://github.com/ScoopInstaller/Scoop/issues/5410))
- **scoop-search:** Improve performance for local search ([#5324](https://github.com/ScoopInstaller/Scoop/issues/5324))
- **shim:** Update kiennq-shim to v3.1 ([#5841](https://github.com/ScoopInstaller/Scoop/issues/5841))

### Code Refactoring

Expand Down
2 changes: 2 additions & 0 deletions supporting/shims/kiennq/.gitignore
@@ -0,0 +1,2 @@
*.zip
*.bak
52 changes: 52 additions & 0 deletions supporting/shims/kiennq/Makefile
@@ -0,0 +1,52 @@

VER?=2.2.1
ZIP=shimexe.zip
URL?=https://github.com/kiennq/scoop-better-shimexe/releases/download/$(VER)/$(ZIP)
LATEST_URL?=https://github.com/kiennq/scoop-better-shimexe/releases/latest
NEWVER=$(shell cat version.txt)

all: verify ## make download unzip verify

version.txt:
@curl --max-redirs 0 -s -D - -o /dev/null $(LATEST_URL) | grep -i ^location | sed -E -e "s|.*/([^/]+)$$|\1|" >version.txt
@printf "%s " "Latest version is:"
@cat version.txt

check: version.txt ## Check the version number in version.txt and update if needed

bump: check ## Bump version number in Makefile
@rm -f Makefile.bak
@sed -i.bak -e 's|=$(VER)|=$(NEWVER)|' Makefile
@cmp --quiet Makefile{,.bak} || echo "Makefile bumped from $(VER) to $(NEWVER)"

$(ZIP): version.txt
curl -L -s -o $(ZIP) $(URL)
@touch $@

download: $(ZIP) ## Download shim from https://github.com/kiennq/scoop-better-shimexe

shim.exe: $(ZIP)
unzip -z -j -o $(ZIP)
@touch $@

unzip: shim.exe ## Unzip download

verify: shim.exe ## Verify SHA256 checksum for shim.exe
sed -e "s|bin/||" checksum.sha256 | sha256sum -c

clean: ## Clean .zip files
rm -f *.zip

help: ## Display help text
@printf "%-8s %s\n" Target Description
@printf "%-8s %s\n" '--------' '------------------------------------------'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%-8s %s\n", $$1, $$2}'

.PHONY: all
.PHONY: bump
.PHONY: check
.PHONY: clean
.PHONY: download
.PHONY: help
.PHONY: unzip
.PHONY: verify
2 changes: 1 addition & 1 deletion supporting/shims/kiennq/checksum.sha256
@@ -1 +1 @@
554aac610eae2cd61cae3dea0c66fd8283e95eb9c4af5dd9e591197c6a28e119 *shim.exe
aa685053f4a5c0e7145f2a27514c8a56ceae25b0824062326f04037937caa558 bin/shim.exe
2 changes: 1 addition & 1 deletion supporting/shims/kiennq/checksum.sha512
@@ -1 +1 @@
88bba1bbe84a1cc0c2492e7c87d761ea449ce80818d619b763f2c6391e114992864e1cf7cd3121350c0bae20bd48a834e56a304d35e8fabcf2dfee58b223e841 *shim.exe
67c605c8163869d8ef8153c64eb09b82645cbae8228928c0fef944d0259a7b2d3791ecf4b4b01e23566916a878ee7977bfc1a59846bccf3c63bd6a1cf4f521b5 bin/shim.exe
Binary file modified supporting/shims/kiennq/shim.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion supporting/shims/kiennq/version.txt
@@ -1 +1 @@
v3.1
2.2.1

0 comments on commit 6f4125b

Please sign in to comment.