Skip to content

Conversation

niheaven
Copy link
Member

@niheaven niheaven commented Aug 9, 2024

Description

First step that refactor download-related functions.

TODOs in other PRs

  • Eliminate duplicate functions
  • Combine similar functions
  • Develop straightforward meta functions for all downloads
  • Consolidate sub-download functions across various methods
  • Enable users to choose a custom download tool

Motivation and Context

How Has This Been Tested?

Test with all related commands:

  • bin\checkhashes.ps1
  • bin\checkurls.ps1
  • bin\checkver.ps1
  • bin\describe.ps1
  • scoop download
  • scoop install
  • scoop search
  • scoop update
  • scoop virustotal

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

@niheaven niheaven force-pushed the refactor-download branch 2 times, most recently from 960dbc5 to a4750c5 Compare August 9, 2024 11:08
@niheaven niheaven force-pushed the refactor-download branch from a4750c5 to 5378450 Compare August 9, 2024 11:28
@niheaven niheaven merged commit 79cf33d into develop Aug 11, 2024
@niheaven niheaven deleted the refactor-download branch August 11, 2024 09:24
HUMORCE added a commit that referenced this pull request Aug 11, 2025
* fix (decompress): `Expand-7zipArchive` only delete temp dir / `$extractDir` if it is empty (#6092)

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* refactor(download): Move download-related functions to 'download.ps1' (#6095)

* fix(download): Fallback to default downloader when aria2 fails (#4292)

* fix(commands): Handling broken aliases (#6141)

* fix(shim): properly check `wslpath`/`cygpath` command first (#6114)

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* fix(scoop-bucket): Add missing import for `no_junction` envs (#6181)

Signed-off-by: Chawye Hsu <[email protected]>

* docs(chglog): Update to 0.5.3 (#6258)

* perf(shim): Update kiennq-shim to v3.1.2 (#6261)

* fix(decompress): Replace deprecated 7ZIPEXTRACT_USE_EXTERNAL config (#6327)

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* fix(scoop-uninstall): Fix uninstaller does not gain Global state (#6430)

* global arg

* changelog

* refactor(Get-Manifest): Select actual source for manifest (#6142)

* first step

* Revert "first step"

This reverts commit c5907c3.

* refactor(Get-Manifest): Select actual source for installed manifest

* rework sub-commands, `scoop-depends` is NOT working at this stage

* URI manifest

* opt

* deprecated manifest

* source of manifests

* source of manifest pt2

- Mark URI(path/URL/UNC/etc.) query as standalone manifest
- Drop `installed` and `available update` items for [query] and [installed] are different sources.

* remove variable preventing I forget it

* scoop-info: fix source of manifest on bucket

* fix `scoop-depends`

* Fix Standalone and Source detection

* fix global install

* Fix scoop-cat, scoop-home

- Query for remote manifest

* scoop-list: info +deprecated

* manifest: Fix first selected manifest

* gramma..

* Fix 61b3259

* length

* fix(scoop-depends-tests): Mocking `USE_EXTERNAL_7ZIP` as $false (#6431)

* fix(scoop-depends-tests): Mocking `USE_EXTERNAL_7ZIP` as $false to avoding error when it is $true

* CHANGELOG

* feat(autoupdate): GitHub predefined hashes support (#6416)

* feat(autoupdate): predefined hash case for GitHub

- Remove `sha256:` prefix in `format_hash()`
- Add GitHub support in `get_hash_for_app()`

Close #6381

* doc(chglog): GitHub auto hash update

* fix(autoupdate): remove prefix only

* docs(CHANGELOG): Update to 0.5.3 (#6432)

* docs(CHANGELOG): Update to 0.5.3

* 6416

---------

Signed-off-by: Chawye Hsu <[email protected]>
Co-authored-by: Olav Rønnestad Birkeland <[email protected]>
Co-authored-by: kiennq <[email protected]>
Co-authored-by: HUMORCE <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: Chawye Hsu <[email protected]>
Co-authored-by: Bassel Rachid <[email protected]>
Co-authored-by: Wordless Echo <[email protected]>
HUMORCE added a commit to HUMORCE/Scoop that referenced this pull request Aug 12, 2025
* chore(release): Bump to version 0.5.3 (ScoopInstaller#6257)

* fix (decompress): `Expand-7zipArchive` only delete temp dir / `$extractDir` if it is empty (ScoopInstaller#6092)

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* refactor(download): Move download-related functions to 'download.ps1' (ScoopInstaller#6095)

* fix(download): Fallback to default downloader when aria2 fails (ScoopInstaller#4292)

* fix(commands): Handling broken aliases (ScoopInstaller#6141)

* fix(shim): properly check `wslpath`/`cygpath` command first (ScoopInstaller#6114)

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* fix(scoop-bucket): Add missing import for `no_junction` envs (ScoopInstaller#6181)

Signed-off-by: Chawye Hsu <[email protected]>

* docs(chglog): Update to 0.5.3 (ScoopInstaller#6258)

* perf(shim): Update kiennq-shim to v3.1.2 (ScoopInstaller#6261)

* fix(decompress): Replace deprecated 7ZIPEXTRACT_USE_EXTERNAL config (ScoopInstaller#6327)

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* fix(scoop-uninstall): Fix uninstaller does not gain Global state (ScoopInstaller#6430)

* global arg

* changelog

* refactor(Get-Manifest): Select actual source for manifest (ScoopInstaller#6142)

* first step

* Revert "first step"

This reverts commit c5907c3.

* refactor(Get-Manifest): Select actual source for installed manifest

* rework sub-commands, `scoop-depends` is NOT working at this stage

* URI manifest

* opt

* deprecated manifest

* source of manifests

* source of manifest pt2

- Mark URI(path/URL/UNC/etc.) query as standalone manifest
- Drop `installed` and `available update` items for [query] and [installed] are different sources.

* remove variable preventing I forget it

* scoop-info: fix source of manifest on bucket

* fix `scoop-depends`

* Fix Standalone and Source detection

* fix global install

* Fix scoop-cat, scoop-home

- Query for remote manifest

* scoop-list: info +deprecated

* manifest: Fix first selected manifest

* gramma..

* Fix 61b3259

* length

* fix(scoop-depends-tests): Mocking `USE_EXTERNAL_7ZIP` as $false (ScoopInstaller#6431)

* fix(scoop-depends-tests): Mocking `USE_EXTERNAL_7ZIP` as $false to avoding error when it is $true

* CHANGELOG

* feat(autoupdate): GitHub predefined hashes support (ScoopInstaller#6416)

* feat(autoupdate): predefined hash case for GitHub

- Remove `sha256:` prefix in `format_hash()`
- Add GitHub support in `get_hash_for_app()`

Close ScoopInstaller#6381

* doc(chglog): GitHub auto hash update

* fix(autoupdate): remove prefix only

* docs(CHANGELOG): Update to 0.5.3 (ScoopInstaller#6432)

* docs(CHANGELOG): Update to 0.5.3

* 6416

---------

Signed-off-by: Chawye Hsu <[email protected]>
Co-authored-by: Olav Rønnestad Birkeland <[email protected]>
Co-authored-by: kiennq <[email protected]>
Co-authored-by: HUMORCE <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: Chawye Hsu <[email protected]>
Co-authored-by: Bassel Rachid <[email protected]>
Co-authored-by: Wordless Echo <[email protected]>

* fix(autoupdate): Skiping github mode while hash.url already set

---------

Signed-off-by: Chawye Hsu <[email protected]>
Co-authored-by: Hsiao-nan Cheung <[email protected]>
Co-authored-by: Olav Rønnestad Birkeland <[email protected]>
Co-authored-by: kiennq <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: Chawye Hsu <[email protected]>
Co-authored-by: Bassel Rachid <[email protected]>
Co-authored-by: Wordless Echo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant