platformio-core icon indicating copy to clipboard operation
platformio-core copied to clipboard

[feature request] cli: add the "build" target

Open MacDada opened this issue 1 year ago • 1 comments

Configuration

Operating system: MacOS 12.6.1 (21G217)

PlatformIO Version (platformio --version): 6.1.5

Description of problem

I couldn't find a way to build the project from CLI [I was using IDE features before that]. Turns out that simple pio run is enough.

Actual Results

✗ pio
Usage: pio [OPTIONS] COMMAND [ARGS]...

Options:
  --version          Show the version and exit.
  -c, --caller TEXT  Caller ID (service)
  --no-ansi          Do not print ANSI control characters
  -h, --help         Show this message and exit.

Commands:
  access    Manage resource access
  account   Manage PlatformIO account
  boards    Board Explorer
  check     Static Code Analysis
  ci        Continuous Integration
  debug     Unified Debugger
  device    Device manager & Serial/Socket monitor
  home      GUI to manage PlatformIO
  org       Manage organizations
  pkg       Unified Package Manager
  project   Project Manager
  remote    Remote Development
  run       Run project targets (build, upload, clean, etc.)
  settings  Manage system settings
  system    Miscellaneous system commands
  team      Manage organization teams
  test      Unit Testing
  upgrade   Upgrade PlatformIO Core to the latest version
✗ pio run --list-targets
Environment    Group     Name         Title                        Description
-------------  --------  -----------  ---------------------------  ----------------------

nodemcuv2      Platform  buildfs      Build Filesystem Image
nodemcuv2      Platform  erase        Erase Flash
nodemcuv2      Platform  size         Program Size                 Calculate program size
nodemcuv2      Platform  upload       Upload
nodemcuv2      Platform  uploadfs     Upload Filesystem Image
nodemcuv2      Platform  uploadfsota  Upload Filesystem Image OTA

Expected Results

A new target called build, so that we can run pio run -t build.

It would be an alias to pio run (without target specified) or the other way around, not specifying a target, would just call the build target.

Additional info

Notice, that when I run pio it shows the line run Run project targets (build, upload, clean, etc.) – this is confusing, as I was expecting the build target to exist as listed.

MacDada avatar Nov 28 '22 02:11 MacDada