Skip to content

Get assets dir from arduino/app-bricks-py repo #165

@martacarbone

Description

@martacarbone

Describe the request

Currently, assets directories are copied directly into the arduino-app-cli repository instead of being pulled from their own respective repositories.

Asset dir in arduino-app-cli repo:

  • debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets
  • internal/e2e/daemon/testdata/assets

Based on an initial analysis, it should be sufficient to:

  • Remove both asset directories from the repository.
  • Add the generate:assets task to the build phase (near the clone examples call).
  • Add the asset directories to the .gitignore file.

Thoughts? Concerns?

martacarbone@work arduino-app-cli % task generate:assets 
task: Both assets folder are already at version '0.6.1'. Nothing to do.
task: Failed to run task "generate:assets": task: precondition not met
martacarbone@work arduino-app-cli % rm -rf debian/arduino-app-cli/home/arduino/.local/share/arduino-app-cli/assets
martacarbone@work arduino-app-cli % rm -rf internal/e2e/daemon/testdata/assets
martacarbone@work arduino-app-cli % task generate:assets                                                          
task: [generate:assets] # Get the corresponding models and bricks release, and unzip it.
gh release download -R arduino/app-bricks-py "release/0.6.1" -p '*.whl' -D "/var/folders/_v/l0cmt8h94bl0jb7957skdkw40000gn/T/generate-assets" --clobber
unzip -o "/var/folders/_v/l0cmt8h94bl0jb7957skdkw40000gn/T/generate-assets/arduino_app_bricks-0.6.1-py3-none-any.whl" -d "/var/folders/_v/l0cmt8h94bl0jb7957skdkw40000gn/T/generate-assets/0.6.1"

Archive:  /var/folders/_v/l0cmt8h94bl0jb7957skdkw40000gn/T/generate-assets/arduino_app_bricks-0.6.1-py3-none-any.whl
  inflating: /var/folders/_v/l0cmt8h94bl0jb7957skdkw40000gn/T/generate-assets/0.6.1/arduino/_version.py  
[...]
task: [generate:assets] echo "Updating the runnerVersion in config.go to '0.6.1'"
Updating the runnerVersion in config.go to '0.6.1'
task: [generate:assets] sed -i '' "s#runnerVersion = \".*#runnerVersion = \"0.6.1\"#" internal/orchestrator/config/config.go
martacarbone@work arduino-app-cli % task generate:assets
task: Both assets folder are already at version '0.6.1'. Nothing to do.
task: Failed to run task "generate:assets": task: precondition not met
martacarbone@work arduino-app-cli % git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
martacarbone@work arduino-app-cli % 

Describe the current behavior

Currently assets dirs in arduino-app-cli repo are a copy of arduino/app-bricks-py

Arduino App CLI version

0.8.0

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions