Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Improve CLI interface #145

Merged
merged 1 commit into from Mar 31, 2021
Merged

Improve CLI interface #145

merged 1 commit into from Mar 31, 2021

Conversation

jesec
Copy link
Contributor

@jesec jesec commented Mar 31, 2021

Much better with "--help" and default values. It also allows us to set CLI
options with PKG_FETCH_OPTION_. For instance:

PKG_FETCH_OPTION_n=node14
PKG_FETCH_OPTION_b=true

builds Node 14 for the host platform and arch. might be useful for Dockerfile-scripts.

We can add descriptions in a later change to make this even more user-friendly.

$ pkg-fetch -h
Options:
-n, --node-range [string] [default: "latest"]
-p, --platform [string] [default: "linux"]
-a, --arch [string] [default: "x64"]
-f, --force-fetch [boolean]
-b, --force-build [boolean]
-v, --version Show version number [boolean]
-h, --help Show help [boolean]

Much better with "--help" and default values. It also allows us to set CLI
options with PKG_FETCH_OPTION_. For instance:

PKG_FETCH_OPTION_n=node14
PKG_FETCH_OPTION_b=true

builds Node 14 for the host platform and arch. might be useful for Dockerfile-scripts.

We can add descriptions in a later change to make this even more user-friendly.

 $ pkg-fetch -h
Options:
  -n, --node-range                                  [string] [default: "latest"]
  -p, --platform                                     [string] [default: "linux"]
  -a, --arch                                           [string] [default: "x64"]
  -f, --force-fetch                                                    [boolean]
  -b, --force-build                                                    [boolean]
  -v, --version      Show version number                               [boolean]
  -h, --help         Show help                                         [boolean]
@leerob leerob merged commit ba011e4 into master Mar 31, 2021
@leerob leerob deleted the pr/yargs branch March 31, 2021 14:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants