archway-network / cli

Develop WASM smart contracts with the Archway network developer CLI
https://docs.archway.io
Apache License 2.0
44 stars 21 forks source link

fix(contracts): Building the optimized WASM doesn't differentiate workspaces from single contracts #225

Closed aelesbao closed 1 year ago

aelesbao commented 1 year ago

Description

The build sub-command should build the entire workspace when the [contract] arg isn't specified. Also, optimizing a single contract will instead optimize the whole workspace.

Technical Description

The default behavior of the cosmwasm/workspace-optimizer image is to build the entire workspace. However, when the user wants to optimize a single contract, the CLI should run the rust-optimizer image instead, with the contract path as an argument (as explained here).