Skip to content

Commit

Permalink
refactor: switch --platform to use list-like format
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Jul 29, 2023
1 parent 72ba1d0 commit 0c88000
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
38 changes: 19 additions & 19 deletions docs/pages/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ nixpacks build --help

### Options

| | |
| :--------------------------------------------- | :-------------------------------------------------------------------------- |
| `--install-cmd <cmd>`, `-i` | Specify the install command |
| `--build-cmd <cmd>`, `-b` | Specify the build command |
| `--start-cmd <cmd>`, `-s` | Specify the start command |
| `--name <name>` | Name for the built image |
| `--env <env> [--env <env>...]` | Provide environment variables to your build. |
| `--pkgs <pkg> [--pkgs <pkg>...]`, `-p` | Provide additional Nix packages to install in the environment |
| `--apt <pkgs> [--apt <pkgs>...]` | Provide additional apt packages to install in the environment |
| `--libs <lib> [--libs <lib>...]` | Provide additional Nix libraries to install in the environment |
| `--tag <tag> [--tag <tag>...]`, `-t` | Additional tags to add to the output image |
| `--label <labels> [--label <labels>...]`, `-l` | Additional labels to add to the output image |
| `--cache-key <key>` | Unique identifier to use for the build cache |
| `--no-cache` | Disable caching for the build |
| `--cache-from` | Image to consider as cache sources |
| `--inline-cache` | Enable writing cache metadata into the output image |
| `--out <dir>`, `-o` | Save output directory instead of building it with Docker |
| `--platform <platforms...>` | Choosing the target platform for the target environment |
| `--config <file>` | Location of the Nixpacks configuration file relative to the root of the app |
| | |
| :------------------------------------------------- | :-------------------------------------------------------------------------- |
| `--install-cmd <cmd>`, `-i` | Specify the install command |
| `--build-cmd <cmd>`, `-b` | Specify the build command |
| `--start-cmd <cmd>`, `-s` | Specify the start command |
| `--name <name>` | Name for the built image |
| `--env <env> [--env <env>...]` | Provide environment variables to your build. |
| `--pkgs <pkg> [--pkgs <pkg>...]`, `-p` | Provide additional Nix packages to install in the environment |
| `--apt <pkg> [--apt <pkg>...]` | Provide additional apt packages to install in the environment |
| `--libs <lib> [--libs <lib>...]` | Provide additional Nix libraries to install in the environment |
| `--tag <tag> [--tag <tag>...]`, `-t` | Additional tags to add to the output image |
| `--label <label> [--label <label>...]`, `-l` | Additional labels to add to the output image |
| `--cache-key <key>` | Unique identifier to use for the build cache |
| `--no-cache` | Disable caching for the build |
| `--cache-from` | Image to consider as cache sources |
| `--inline-cache` | Enable writing cache metadata into the output image |
| `--out <dir>`, `-o` | Save output directory instead of building it with Docker |
| `--platform <platform> [--platform <platform>...]` | Choosing the target platform for the target environment |
| `--config <file>` | Location of the Nixpacks configuration file relative to the root of the app |

#### Environment Variables

Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ enum Commands {

/// Set target platform for your output image
#[arg(long)]
platform: Vec<String>,
platform: Option<Vec<String>>,

/// Unique identifier to key cache by. Defaults to the current directory
#[arg(long)]
Expand Down Expand Up @@ -259,7 +259,7 @@ async fn main() -> Result<()> {
quiet: false,
cache_key,
no_cache,
platform,
platform: platform.unwrap_or_default(),
print_dockerfile: dockerfile,
current_dir,
inline_cache,
Expand Down

0 comments on commit 0c88000

Please sign in to comment.