Commit 727469f
🩹 [Patch]: Refactor font data retrieval to use GitHub PowerShell (#42)
## Description
This pull request updates the `scripts/Update-FontsData.ps1` script to
improve the retrieval of font data from the Nerd Fonts repository. The
changes replace the use of `Invoke-RestMethod` with a more structured
approach using custom PowerShell functions, enhancing readability and
maintainability.
Enhancements to font data retrieval:
* Replaced low-level commands with GitHub PowerShell commands:
* `Invoke-RestMethod` with `Get-GitHubRelease` to fetch the latest
release data from the Nerd Fonts repository.
* `browser_download_url` property under assets on a release, with
`Get-GitHubReleaseAsset` to fetch the URL of the assets that are added
to the release.
* Updated the loop to use `[PSCustomObject]` instead of `[ordered]@` for
better view and troubleshooting.
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] 📖 [Docs]
- [ ] 🪲 [Fix]
- [x] 🩹 [Patch]
- [ ] 1 parent 920af2d commit 727469f
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments