shorebirdtech / updater

libupdater code for Shorebird
Other
65 stars 13 forks source link

feat: add updater_tools with package_patch command #163

Closed bryanoltman closed 2 months ago

bryanoltman commented 2 months ago

Description

Adds an initial updater_tools package_patch command that accepts two aabs (a release and a patch) and generates patch artifacts for them.

Sample usage:

dart run updater_tools package_patch \
  --archive-type=aab \
  --release ~/Desktop/release.aab \
  --patch ~/Desktop/patch.aab \
  --patch-executable=$HOME/shorebirdtech/_shorebird/shorebird/bin/cache/artifacts/patch/patch \
  --output=$HOME/Desktop/testout 

Outputs to $HOME/Desktop/testout:

bryanoltman@moltman ~/Desktop
⑆ l testout
total 24
drwx------   5 bryanoltman  staff   160B May 16 11:55 .
drwx------@ 88 bryanoltman  staff   2.8K May 16 11:55 ..
-rw-r--r--   1 bryanoltman  staff   160B May 16 11:54 arm64-v8a.zip
-rw-r--r--   1 bryanoltman  staff   160B May 16 11:54 armeabi-v7a.zip
-rw-r--r--   1 bryanoltman  staff   160B May 16 11:55 x86_64.zip

Where the contents of each .zip file is the dlc.vmcode produced by the patch executable.

Type of Change

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.13%. Comparing base (5707bd8) to head (cb4c840).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #163 +/- ## ========================================== + Coverage 95.98% 96.13% +0.15% ========================================== Files 21 26 +5 Lines 2963 3078 +115 ========================================== + Hits 2844 2959 +115 Misses 119 119 ``` | [Flag](https://app.codecov.io/gh/shorebirdtech/updater/pull/163/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shorebirdtech) | Coverage Ξ” | | |---|---|---| | [updater_tools](https://app.codecov.io/gh/shorebirdtech/updater/pull/163/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shorebirdtech) | `100.00% <100.00%> (ΓΈ)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shorebirdtech#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bryanoltman commented 2 months ago

The contents of each zip is intended to be opaque, the idea being that arch_name.zip will be what is handed back to the CLI and (eventually) to the updater as a patch artifact. In theory, no other part of the system should need to care about the contents/layout of the zip.

Re: the content/layout of the output directory, I think that should be stable so long as we stick to a one-patch-artifact-per-arch model. We can always ask updater_tools what its version is and skew on that if/when we need as well.