canonical / craft-application

The basis for *craft applications
https://canonical-craft-application.readthedocs-hosted.com/en/latest
GNU Lesser General Public License v3.0
5 stars 6 forks source link

feat: add `needs_project` property #340

Closed mr-cal closed 1 month ago

mr-cal commented 1 month ago

Two things:

  1. Refactors the LifecycleCommands classes in a slightly more organized way without changing any existing commands. This is required for snapcraft to define its own Pack command with minimal duplicated code (https://github.com/canonical/snapcraft/pull/4794)
  2. Add a needs_project property, which can determine if a project needs to be loaded based on the provided arguments.

Fixes https://github.com/canonical/snapcraft/issues/4769 (CRAFT-2861)

mr-cal commented 1 month ago

Force-pushing so I can rebase