Skip to content

feat(bundler): improve GitHub mirror URL generation with custom templates#11096

Merged
amrbashir merged 17 commits intotauri-apps:devfrom
thep0y:dev
Sep 24, 2024
Merged

feat(bundler): improve GitHub mirror URL generation with custom templates#11096
amrbashir merged 17 commits intotauri-apps:devfrom
thep0y:dev

Conversation

@thep0y
Copy link
Contributor

@thep0y thep0y commented Sep 23, 2024

  • Add support for custom GitHub mirror URL templates via TAURI_BUNDLER_TOOLS_GITHUB_MIRROR_TEMPLATE env var
  • Refactor URL generation logic into separate functions for better modularity
  • Implement regex-based parsing of GitHub URLs to extract components
  • Add unit tests for new URL generation functionality
  • Remove direct dependency on ureq::AgentBuilder in favor of more flexible approach
  • Update create_agent_and_url function to use new URL generation methods

Closes: #10497

…ates

- Add support for custom GitHub mirror URL templates via `TAURI_BUNDLER_TOOLS_GITHUB_MIRROR_TEMPLATE` env var
- Refactor URL generation logic into separate functions for better modularity
- Implement regex-based parsing of GitHub URLs to extract components
- Add unit tests for new URL generation functionality
- Remove direct dependency on `ureq::AgentBuilder` in favor of more flexible approach
- Update `create_agent_and_url` function to use new URL generation methods
@thep0y thep0y requested a review from a team as a code owner September 23, 2024 14:31
@github-actions
Copy link
Contributor

github-actions bot commented Sep 23, 2024

Package Changes Through 768dce7

There are 10 changes which include @tauri-apps/api with prerelease, tauri-bundler with prerelease, tauri-cli with prerelease, tauri with prerelease, tauri-runtime-wry with prerelease, tauri-runtime with prerelease, tauri-utils with prerelease, @tauri-apps/cli with prerelease, tauri-build with prerelease, tauri-codegen with prerelease

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.0.0-rc.5 2.0.0-rc.6
tauri-utils 2.0.0-rc.12 2.0.0-rc.13
tauri-bundler 2.0.1-rc.13 2.0.1-rc.14
tauri-runtime 2.0.0-rc.12 2.0.0-rc.13
tauri-runtime-wry 2.0.0-rc.13 2.0.0-rc.14
tauri-codegen 2.0.0-rc.12 2.0.0-rc.13
tauri-macros 2.0.0-rc.11 2.0.0-rc.12
tauri-plugin 2.0.0-rc.12 2.0.0-rc.13
tauri-build 2.0.0-rc.12 2.0.0-rc.13
tauri 2.0.0-rc.15 2.0.0-rc.16
@tauri-apps/cli 2.0.0-rc.16 2.0.0-rc.17
tauri-cli 2.0.0-rc.16 2.0.0-rc.17

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

thep0y and others added 4 commits September 24, 2024 08:20
thep0y and others added 5 commits September 24, 2024 11:39
… handling

- Change `generate_mirror_url_from_base` and `generate_alternative_url` to return `Option<T>` instead of `crate::Result<Option<T>>`.
- Simplify the logic in `create_agent_and_url` by removing the `crate::Result` wrapper.
- Remove unnecessary `Ok` and `?` usage, streamline error handling.
Combines two similar test functions into a single parameterized test for
better maintainability and easier addition of future test cases.
@thep0y thep0y requested a review from amrbashir September 24, 2024 07:45
thep0y and others added 4 commits September 24, 2024 19:22
- Renamed `generate_mirror_url_from_template` to `generate_github_mirror_url_from_template`
- Renamed `generate_mirror_url_from_base` to `generate_github_mirror_url_from_base`
- Renamed `generate_alternative_url` to `generate_github_alternative_url`
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.

[feat] provide mirror option for download nsis and wix3

3 participants