Hsiao-nan Cheung
79cf33d0b7
refactor(download): Move download-related functions to 'download.ps1' ( #6095 )
2024-08-11 17:23:59 +08:00
Hsiao-nan Cheung
98cf8ae4da
fix(autoupdate): Fix bug that 'WebClient' doesn't auto-extract 'gzip' ( #5901 )
2024-04-17 22:29:20 +08:00
Hsiao-nan Cheung
92b71c6057
refactor(core): Get rid of 'fullpath' ( #3533 )
2024-04-10 14:55:20 +08:00
Hsiao-nan Cheung
52f9ce3a81
fix(autoupdate): Fix file hash extraction ( #5295 )
2022-12-18 23:15:03 +08:00
Hsiao-nan Cheung
d0cbc36a58
fix(hash): Fix SF hash extraction ( #5189 )
2022-10-14 18:21:52 +08:00
Hsiao-nan Cheung
24301ac028
refactor(hash): Use 'Get-FileHash()' directly ( #5177 )
2022-10-13 19:15:32 +08:00
Hsiao-nan Cheung
7f47f662e2
feat(subdir): Allow subdir in 'bucket' ( #5119 )
2022-09-28 11:22:33 +08:00
Rashil Gandhi
7a599f062f
feat(install): Add support for ARM64 architecture ( #5154 )
...
* Initial support for ARMv8
* Add fallback mechanism
* Update changelog
* Update useragent
* Some typo and format changes
* Use `env:ProgramFiles(Arm)` to detect ARM64
- Move `default_architecture()` to `core.ps1`
* Rename 'ensure_architecture()' and 'default_architecture()'
* Refactor 'supports_architecture()' to 'Get-SupportedArchitecture()'
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com >
2022-09-28 04:19:03 +05:30
Jules
122fdc1a1c
refactor(download): Rename dl() to Invoke-Download() ( #5143 )
2022-09-16 10:36:40 +08:00
yi_Xu
6e25e440af
feat(core): Add 'Get-Encoding()' function to fix missing webClient encoding ( #4956 )
...
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com >
2022-06-13 23:21:57 +08:00
Hsiao-nan Cheung
6296822f1f
perf(scoop): Load libs only once ( #4839 )
2022-04-21 21:34:26 +08:00
HUMORCE
63b858c41f
style: Use correct casing for $PSScriptRoot ( #4775 )
2022-03-04 22:55:45 +08:00
snowman
e0a5313132
fix(autoupdate): rename $response to $res ( #4706 )
...
* fix(autoupdate): rename $response to $res
* docs(changelog): Update CHANGELOG.md
2022-02-02 08:22:28 +05:30
Issac Lin
fba658c020
fix(autoupdate): Allow checksum file that contains whitespaces ( #4619 )
2022-01-05 15:01:05 +08:00
Hsiao-nan Cheung
1490869e6f
fix(autoupdate): Update array of arrays correctly ( #4502 )
2021-11-08 19:55:03 +08:00
Hsiao-nan Cheung
5851eaf762
feat(autoupdate): add multi-urls aupport to 'autoupdate'
...
Also refactor
- 'update_manifest_with_new_version' -> 'Update-ManifestProperty'
- 'update_manifest_prop' -> 'PropertyHelper'
- 'autoupdate' -> 'Invoke-AutoUpdate'
Co-Authored-By: Jakub Čábera <cabera.jakub@gmail.com >
Signed-off-by: Hsiao-nan Cheung <niheaven@gmail.com >
2020-03-10 14:30:09 +08:00
Hsiao-nan Cheung
2a91ddb101
refactor(autoupdate): 'get_version_substitutions' -> 'Get-VersionSubstitution'
...
Signed-off-by: Hsiao-nan Cheung <niheaven@gmail.com >
2020-03-10 13:46:36 +08:00
Ross Smith II
9c9cc807ba
feat(autoupdate): initial multi-urls works by @rasa
...
Add multiple URLs support to 'autoupdate'
Co-Authored-By: Jakub Čábera <cabera.jakub@gmail.com >
Signed-off-by: Hsiao-nan Cheung <niheaven@gmail.com >
2020-03-10 13:46:36 +08:00
Richard Kuhnt
8ac23f8fbc
feat(autoupdate): Add $urlNoExt and $basenameNoExt substitutions ( #3742 )
...
Mentioned in https://github.com/lukesampson/scoop-extras/pull/2124/files#r282758151
2019-11-09 20:02:59 +01:00
linsui
19ed5e42a8
fix(autoupdate): Decode basename when extract hash ( #3615 )
...
Co-authored-by: Jakub Čábera <cabera.jakub@gmail.com >
2019-10-14 14:07:38 +02:00
linsui
9ad783d3a5
fix(autoupdate): remove any whitespace from hash ( #3579 )
...
Allow extracting hashes with containing spaces and newlines
(e.g. `ef 5d 41 08 32 9c 71 b4 b5 b6 0f be 2f bc 49 ac ef 86 69 49 42 e8 37 65 a4 86 30
10 ea be 0d 79`)
FreeCad Example:
```json
"hash": {
"url": "$url-SHA256.txt",
"regex": "(?sm):\\s+([a-f\\d\\s]+)CertUtil"
}
```
2019-08-01 18:08:16 +02:00
Chawye Hsu
765706ce38
fix(autoupdate): Handle xml namespace in xpath mode ( #3465 )
2019-05-15 16:54:59 +02:00
Chawye Hsu
f6062855ba
feat(manifest): xpath support in checkver and autoupdate ( #3458 )
2019-05-13 21:06:26 +02:00
Jakub Čábera
56d54d1c91
feature: Prepare extraction of main bucket ( #3060 )
...
- Add preparing changes for extracting the main bucket to https://github.com/scoopinstaller/scoop-main
- Download main bucket on installation
- Add check_main_bucket function
- Add main bucket to buckets.json
- Add docker-compose.yml with default debugging image
- Remove old TODOs
- Refactor bucketdir -> Find-BucketDirectory
- Remove redundant .vscode settings
2019-04-24 21:08:53 +02:00
Hsiao-nan Cheung
6d7fafb145
autoupdate.ps1: Add $base64 hash template
2019-04-04 12:30:18 +02:00
Hsiao-nan Cheung
5d14db6786
core.ps1: Fix url_remote_filename (edited) ( #3022 )
...
EDITED: No WebRequest, Local URL Treatment
Current `url_remote_filename()` cannot handle redirected urls like "https://www.apache.org/dyn/closer.cgi?action=download&filename=tomcat/tomcat-9/v9.0.14/bin/apache-tomcat-9.0.14-windows-x64.zip ", this modified one works in most cases.
- Get filename from PathAndQuery instead of AbsolutePath
- Throw away leading `?=`
- If got `vxx.xx.xx`, fallback to AbsolutePath
- Use fragment name if all above failed
2019-03-11 10:07:53 +01:00
Jakub Čábera
bc8985402a
[Schema] Add metalink mode to hashmode ( #3170 )
...
* [Schema] Add metalink mode
Schema is missing property for metalink
See: 57b0b0e1eb/lib/autoupdate.ps1 (L213-L218)
* Make fosshub and sourceforge same as other methods
2019-03-04 14:00:16 +01:00
Hsiao-nan Cheung
0696ec52f8
Fix fosshub.com url handler and add fosshub hash mode ( #3126 )
...
- Fix broken fosshub.com url handle function. It can handle urls like `https://www.fosshub.com/Calibre.html/calibre-64bit-3.39.1.msi ` or `https://www.fosshub.com/Audacity.html?dwl=audacity-win-2.3.0.zip ` and get the right download link.
- Add `fosshub` hash extraction mode.
2019-02-16 19:47:13 +01:00
Richard Kuhnt
9133206acd
autoupdate.ps1: Add regex substitutions for all hash functions
2019-02-03 16:54:27 +01:00
Richard Kuhnt
122877620d
autoupdate.ps1: Add debug functions calls to find_hash_in_textfile()
...
- This can be useful for debugging regex issues
2019-02-03 16:49:46 +01:00
Hsiao-nan Cheung
ef343d7f75
autoupdate.ps1: Fixes bug for single line hash extraction ( #3015 )
...
Fix a bug introduced in #2996 that single line hash extraction is broken.
When `find_hash_in_textfile()` is called in `get_hash_for_app()`, `$null` is used as `$regex` value for default single line hash extraction and the default value (`'^([a-fA-F0-9]+)$'`) is overriden, which leads a error of "hash not found".
2019-01-21 11:42:49 +01:00
Hsiao-nan Cheung
dfe846aca0
Add version variables to JSONPath
2019-01-17 16:14:10 +08:00
Hsiao-nan Cheung
c3ee407197
Use substitute to replace version variables
2019-01-17 15:11:16 +08:00
Hsiao-nan Cheung
c6de3b7c98
Add version variables to autoupdate.hash.regex
2019-01-16 15:20:41 +08:00
Jakub Čábera
614b3279ba
[autoupdate] base64 hash extraction fix ( #2852 )
2018-12-06 20:54:47 +01:00
Richard Kuhnt
310096e238
autoupdate: improve base64 hash detection
2018-10-01 16:35:47 +02:00
Richard Kuhnt
3453487ed6
autoupdate: add 'regex' alias for 'find'
2018-09-18 19:30:18 +02:00
Richard Kuhnt
76fdb6b74c
checkver: add 'jsonpath' alias for 'jp'
2018-09-18 19:29:48 +02:00
Richard Kuhnt
98afb99990
autoupdate: Fix base64 hash extraction
2018-09-10 03:18:19 +02:00
Richard Kuhnt
c9539b6575
autoupdate: linter fix
2018-09-09 21:19:45 +02:00
Richard Kuhnt
04c9ddeb6d
autoupdate: Convert base64 encoded hash values
2018-09-09 16:57:47 +02:00
Richard Kuhnt
19373f4b9b
Add metalink support for aria2c ( #2560 )
...
This should fix #2480 and fix https://github.com/lukesampson/scoop-extras/issues/1126
2018-09-06 11:57:09 +02:00
Richard Kuhnt
2ad547477b
autoupdate: Fix metalink hash extraction
2018-09-04 14:21:39 +02:00
Richard Kuhnt
ecf627c3b8
Allow simple metalink and meta4 hash extraction
2018-08-14 19:00:58 +02:00
Richard Kuhnt
cc9412c0ec
Replace spaces after matching hash extraction
...
It's now possible to extract hashes with this format:
AF 45 EE B0 6D C1 BE EE 6D 4C 70 B9 2C 0E 02 37
2018-04-21 22:32:14 +02:00
Richard Kuhnt
12962acfa8
Use consistent User-Agent Header on all webrequests
2018-03-18 16:35:01 +01:00
Richard Kuhnt
21bf0dea56
Improve auto-update hash extraction regex
...
- Match only space and tab (\x20\t) instead of all whitespaces (\s)
- Match only supported hash length (32 for md5 until 128 for sha512)
- Ignores everything before the filename
- Fixes a small bug where the last bit matched first digits from the next line but was not an issue because of non-capture group
2018-03-18 15:34:39 +01:00
Chawye Hsu
731247876d
[Pending] Finally we add the code linting and its tests! ( #2108 )
...
* Lint: PSPossibleIncorrectComparisonWithNull
* Lint: PSUseLiteralInitializerForHashtable
* Lint: PSUseBOMForUnicodeEncodedFile
* Lint: PSUseApprovedVerbs
* Lint: PSAvoidGlobalVars
* Lint: PSAvoidUsingEmptyCatchBlock
* Lint: PSUseShouldProcessForStateChangingFunctions
* Lint helper: Add PSScriptAnalyzer integration for vscode
* Fix lint: PSUseBOMForUnicodeEncodedFile
* Tests: ignore previous TestResults.xml
* Tests: add PowerShell script linting into tests!
* Add PSScriptAnalyzer into appveyor ci
* Update Scoop-Linting.Tests.ps1
2018-03-13 14:26:55 +01:00
Chawye Hsu
e1bb1e91d0
Lint: PSAvoidUsingCmdletAliases ( #2075 )
2018-03-03 18:41:19 +01:00
Richard Kuhnt
23d7168830
add head and tail part of version based on common format
...
See https://regex101.com/r/rNWldX/1
2018-02-04 14:11:17 +01:00