-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[native_assets_cli] Add example for downloading assets #1860
Conversation
PR HealthBreaking changes ✔️
API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
2fb6bd5
to
9b13058
Compare
2e55936
to
ab77834
Compare
81961d7
to
831e0f6
Compare
@@ -0,0 +1,117 @@ | |||
name: download_asset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name is a bit misleading, maybe building_assets
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, yeah, it's the name of the example package, because we're in a mono repo here. I agree with you that if it's not a mono repo it should probably be named building_assets
. Should we name it package_download_asset.yaml
and name: package_download_asset
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but it's just a nit. So do as you want :)
iOSSdk?.type, | ||
)]; | ||
if (fileHash != expectedHash) { | ||
throw Exception('File $file was not downloaded correctly.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I would print the hashes
Add an example for how to download assets in a hook which are built on GitHub CI.
Design approach:
tool/build.dart
usespackage:native_toolchain_c
.hook/build.dart
downloads the artifacts.tool/generate_asset_hashes.dart
generates hashes that are used inhook/build.dart
to check download integrity.GitHub actions mostly cargo culted from:
Closes: #157