nushell/scripts/build-all.nu
Antoine Stevan 15406a4247
add a new toolkit install command with --features support (#9288)
# Description
i was installing Nushell and, as we have the `dataframe` feature and
very soon at least the `extra` feature with more and more commands, i
thought it could be cool to have a little `toolkit install` command
😋

# User-Facing Changes
exposes the following command to developers
```
install Nushell and features you want

Usage:
  > install ...(features) 

Flags:
  -h, --help - Display the help message for this command

Parameters:
  ...features <string>: a space-separated list of feature to install with Nushell
```

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
-  `toolkit test`
-  `toolkit test stdlib`

# After Submitting
```
$nothing
```
2023-05-26 11:22:34 +02:00

40 lines
955 B
Text

use std log warning
print '-------------------------------------------------------------------'
print 'Building nushell (nu) with dataframes and all the plugins'
print '-------------------------------------------------------------------'
warning "./scripts/build-all.nu will be deprecated, please use the `toolkit build` command instead"
let repo_root = ($env.CURRENT_FILE | path dirname -n 2)
def build-nushell [] {
print $'(char nl)Building nushell'
print '----------------------------'
cd $repo_root
cargo build --features=dataframe
}
def build-plugin [] {
let plugin = $in
print $'(char nl)Building ($plugin)'
print '----------------------------'
cd $'($repo_root)/crates/($plugin)'
cargo build
}
let plugins = [
nu_plugin_inc,
nu_plugin_gstat,
nu_plugin_query,
nu_plugin_example,
nu_plugin_custom_values,
nu_plugin_formats,
]
for plugin in $plugins {
$plugin | build-plugin
}