-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[hab] Add hab studio
subcommand.
#567
Conversation
This change introduces a new top-level subcommand noun: `studio`. The implementation logic is virtually identical to the `hab sup` subcommand, meaning that the `core/hab-studio` package is installed if not present and then directly invoked via an `exec(1)` syscall. ```sh > hab hab 0.5.0 Authors: The Habitat Maintainers <[email protected]> "A Habitat is the natural environment for your services" - Alan Turing USAGE: hab [FLAGS] [SUBCOMMAND] FLAGS: -h, --help Prints help information -V, --version Prints version information SUBCOMMANDS: artifact Commands relating to Habitat artifacts config Commands relating to Habitat runtime config file Commands relating to Habitat files help Prints this message or the help of the given subcommand(s) origin Commands relating to Habitat origin keys pkg Commands relating to Habitat packages ring Commands relating to Habitat rings service Commands relating to Habitat services studio Commands relating to Habitat Studios sup Commands relating to the Habitat Supervisor user Commands relating to Habitat users ALIASES: apply Alias for: 'config apply' install Alias for: 'pkg install' start Alias for: 'sup start' > hab studio -t busybox enter ∵ Package for core/hab-studio not found, installing » Installing core/hab-studio ↓ Downloading core/hab-studio/0.5.0/20160524185743 2.52 MB / 2.52 MB / [==================================================================================================================================================================================================] 100.00 % 49.32 MB/s ✓ Installed core/hab-studio/0.5.0/20160524185743 ★ Install of core/hab-studio complete with 1 packages installed. hab-studio: Creating Studio at /hab/studios/src (busybox) hab-studio: Entering Studio at /hab/studios/src (busybox) [#][busybox:/src:0]# exit > hab stu rm hab-studio: Destroying Studio at /hab/studios/src (busybox) ``` Signed-off-by: Fletcher Nichol <[email protected]>
Note that in the example above I used a We have a pretty powerful primitive now in: hab studio build plans/hab-backline |
@@ -5,8 +5,17 @@ | |||
// the Software until such time that the Software is made available under an | |||
// open source license such as the Apache 2.0 License. | |||
|
|||
use env as henv; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't conflict with std::env
since you aren't importing it. I don't think you need to import as henv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're totally right, I bet that was straight up use
copy pasta
📌 Commit 7064db0 has been approved by |
This change introduces a new top-level subcommand noun: `studio`. The implementation logic is virtually identical to the `hab sup` subcommand, meaning that the `core/hab-studio` package is installed if not present and then directly invoked via an `exec(1)` syscall. ```sh > hab hab 0.5.0 Authors: The Habitat Maintainers <[email protected]> "A Habitat is the natural environment for your services" - Alan Turing USAGE: hab [FLAGS] [SUBCOMMAND] FLAGS: -h, --help Prints help information -V, --version Prints version information SUBCOMMANDS: artifact Commands relating to Habitat artifacts config Commands relating to Habitat runtime config file Commands relating to Habitat files help Prints this message or the help of the given subcommand(s) origin Commands relating to Habitat origin keys pkg Commands relating to Habitat packages ring Commands relating to Habitat rings service Commands relating to Habitat services studio Commands relating to Habitat Studios sup Commands relating to the Habitat Supervisor user Commands relating to Habitat users ALIASES: apply Alias for: 'config apply' install Alias for: 'pkg install' start Alias for: 'sup start' > hab studio -t busybox enter ∵ Package for core/hab-studio not found, installing » Installing core/hab-studio ↓ Downloading core/hab-studio/0.5.0/20160524185743 2.52 MB / 2.52 MB / [==================================================================================================================================================================================================] 100.00 % 49.32 MB/s ✓ Installed core/hab-studio/0.5.0/20160524185743 ★ Install of core/hab-studio complete with 1 packages installed. hab-studio: Creating Studio at /hab/studios/src (busybox) hab-studio: Entering Studio at /hab/studios/src (busybox) [#][busybox:/src:0]# exit > hab stu rm hab-studio: Destroying Studio at /hab/studios/src (busybox) ``` Signed-off-by: Fletcher Nichol <[email protected]> Pull request: #567 Approved by: reset
☀️ Test successful - travis |
This change introduces a new top-level subcommand noun: `studio`. The implementation logic is virtually identical to the `hab sup` subcommand, meaning that the `core/hab-studio` package is installed if not present and then directly invoked via an `exec(1)` syscall. ```sh > hab hab 0.5.0 Authors: The Habitat Maintainers <[email protected]> "A Habitat is the natural environment for your services" - Alan Turing USAGE: hab [FLAGS] [SUBCOMMAND] FLAGS: -h, --help Prints help information -V, --version Prints version information SUBCOMMANDS: artifact Commands relating to Habitat artifacts config Commands relating to Habitat runtime config file Commands relating to Habitat files help Prints this message or the help of the given subcommand(s) origin Commands relating to Habitat origin keys pkg Commands relating to Habitat packages ring Commands relating to Habitat rings service Commands relating to Habitat services studio Commands relating to Habitat Studios sup Commands relating to the Habitat Supervisor user Commands relating to Habitat users ALIASES: apply Alias for: 'config apply' install Alias for: 'pkg install' start Alias for: 'sup start' > hab studio -t busybox enter ∵ Package for core/hab-studio not found, installing » Installing core/hab-studio ↓ Downloading core/hab-studio/0.5.0/20160524185743 2.52 MB / 2.52 MB / [==================================================================================================================================================================================================] 100.00 % 49.32 MB/s ✓ Installed core/hab-studio/0.5.0/20160524185743 ★ Install of core/hab-studio complete with 1 packages installed. hab-studio: Creating Studio at /hab/studios/src (busybox) hab-studio: Entering Studio at /hab/studios/src (busybox) [#][busybox:/src:0]# exit > hab stu rm hab-studio: Destroying Studio at /hab/studios/src (busybox) ``` Signed-off-by: Fletcher Nichol <[email protected]> Pull request: #567 Approved by: reset
This change introduces a new top-level subcommand noun: `studio`. The implementation logic is virtually identical to the `hab sup` subcommand, meaning that the `core/hab-studio` package is installed if not present and then directly invoked via an `exec(1)` syscall. ```sh > hab hab 0.5.0 Authors: The Habitat Maintainers <[email protected]> "A Habitat is the natural environment for your services" - Alan Turing USAGE: hab [FLAGS] [SUBCOMMAND] FLAGS: -h, --help Prints help information -V, --version Prints version information SUBCOMMANDS: artifact Commands relating to Habitat artifacts config Commands relating to Habitat runtime config file Commands relating to Habitat files help Prints this message or the help of the given subcommand(s) origin Commands relating to Habitat origin keys pkg Commands relating to Habitat packages ring Commands relating to Habitat rings service Commands relating to Habitat services studio Commands relating to Habitat Studios sup Commands relating to the Habitat Supervisor user Commands relating to Habitat users ALIASES: apply Alias for: 'config apply' install Alias for: 'pkg install' start Alias for: 'sup start' > hab studio -t busybox enter ∵ Package for core/hab-studio not found, installing » Installing core/hab-studio ↓ Downloading core/hab-studio/0.5.0/20160524185743 2.52 MB / 2.52 MB / [==================================================================================================================================================================================================] 100.00 % 49.32 MB/s ✓ Installed core/hab-studio/0.5.0/20160524185743 ★ Install of core/hab-studio complete with 1 packages installed. hab-studio: Creating Studio at /hab/studios/src (busybox) hab-studio: Entering Studio at /hab/studios/src (busybox) [#][busybox:/src:0]# exit > hab stu rm hab-studio: Destroying Studio at /hab/studios/src (busybox) ``` Signed-off-by: Fletcher Nichol <[email protected]> Pull request: #567 Approved by: reset
This change introduces a new top-level subcommand noun:
studio
. Theimplementation logic is virtually identical to the
hab sup
subcommand,meaning that the
core/hab-studio
package is installed if not presentand then directly invoked via an
exec(1)
syscall.