Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes committed Jan 9, 2025
1 parent 831e0f6 commit 16d4e33
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: download_asset
# A workflow that goes together with the example package:download_asset inside
# package:native_assets_cli.
name: package_download_asset

permissions:
contents: write
Expand All @@ -7,7 +9,7 @@ on:
pull_request:
branches: [ main ]
paths:
- .github/workflows/download_asset.yaml
- .github/workflows/package_download_asset.yaml
- pkgs/native_assets_cli/example/build/download_asset/
push:
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Run tests with `dart --enable-experiment=native-assets test`.
A typical layout of a package which downloads assets:

* `tool/build.dart` prebuilts assets and is exercised from a GitHub workflow.
* A [github workflow](../../../../../.github/workflows/native.yaml) that builds assets.
* A [GitHub workflow](../../../../../.github/workflows/package_download_asset.yaml) that builds assets.
* `hook/build.dart` downloads the prebuilt assets.
* `lib/` contains Dart code which uses the assets.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ void main(List<String> args) async {
iOSSdk?.type,
)];
if (fileHash != expectedHash) {
throw Exception('File $file was not downloaded correctly.');
throw Exception('File $file was not downloaded correctly. '
'Found hash $fileHash, expected $expectedHash.');
}
output.assets.code.add(CodeAsset(
package: input.packageName,
Expand Down

0 comments on commit 16d4e33

Please sign in to comment.