particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

Feature/sc 121837/support local flash without internet access #678

Closed hugomontero closed 11 months ago

hugomontero commented 11 months ago

Description

This PR will allow the use of flashing device os offline. When the user downloads an specific device os version it will be cached in a file, then if the user tries to download it again without internet access, then the cli will looks into the cached file to try to flash the device.

How to Test

  1. Pull down the branch: git pull && git checkout feature/sc-121837/support-local-flash-without-internet-access
  2. Install dependencies: npm i
  3. Run tests: npm test
  4. Attempt to run steps with internet access
  5. Attempt to run steps without internet access
  6. Remove the device-os-version-cached.json from ~/.particle/device-os-flash/binaries
  7. Attempt to run steps without internet access
  8. Re-run step 4
  9. Delete the binaries from ~/.particle/device-os-flash/binaries/${version}/${platform}
  10. Attempt to run steps without internet access

Steps with internet access:

Steps Without internet access

outcome

Related Issues / Discussions

Story details 👉 https://app.shortcut.com/particle/story/121837/support-local-flash-without-internet-access

Completeness