From ac4ab452d4fad7785a10d50020ac77e135a66198 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Mon, 21 Aug 2023 12:42:42 -0500 Subject: [PATCH] update install/build scripts to include `--locked` (#10086) # Description This PR updates the toolkit and the build/install scripts to include `--locked`, also added `extra` feature to the _all_ scripts, and `--force` to the install scripts. # User-Facing Changes # Tests + Formatting # After Submitting --- scripts/build-all-maclin.sh | 2 +- scripts/build-all-windows.cmd | 2 +- scripts/build-all.nu | 2 +- scripts/install-all.ps1 | 2 +- scripts/install-all.sh | 2 +- scripts/uninstall-all.sh | 1 + toolkit.nu | 5 +++-- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/build-all-maclin.sh b/scripts/build-all-maclin.sh index aad21d7b2a..22a8c246dd 100755 --- a/scripts/build-all-maclin.sh +++ b/scripts/build-all-maclin.sh @@ -21,7 +21,7 @@ NU_PLUGINS=( echo "Building nushell" ( cd $REPO_ROOT - cargo build --features=dataframe + cargo build --features=dataframe,extra --locked ) for plugin in "${NU_PLUGINS[@]}" diff --git a/scripts/build-all-windows.cmd b/scripts/build-all-windows.cmd index 73dfd3027e..49cb18fd8c 100644 --- a/scripts/build-all-windows.cmd +++ b/scripts/build-all-windows.cmd @@ -5,7 +5,7 @@ echo ------------------------------------------------------------------- echo. echo Building nushell.exe -cargo build --features=dataframe +cargo build --features=dataframe,extra --locked echo. call :build crates\nu_plugin_example nu_plugin_example.exe diff --git a/scripts/build-all.nu b/scripts/build-all.nu index 51a0117e45..bc94c2498d 100644 --- a/scripts/build-all.nu +++ b/scripts/build-all.nu @@ -13,7 +13,7 @@ def build-nushell [] { print '----------------------------' cd $repo_root - cargo build --features=dataframe + cargo build --features=dataframe,extra --locked } def build-plugin [] { diff --git a/scripts/install-all.ps1 b/scripts/install-all.ps1 index c1f14f39f1..63f2b5365f 100644 --- a/scripts/install-all.ps1 +++ b/scripts/install-all.ps1 @@ -8,7 +8,7 @@ Write-Output "" Write-Output "Install nushell from local..." Write-Output "----------------------------------------------" -cargo install --force --path . --features=dataframe +cargo install --force --path . --features=dataframe,extra --locked $NU_PLUGINS = @( 'nu_plugin_example', diff --git a/scripts/install-all.sh b/scripts/install-all.sh index 60629a73df..94d54dac74 100755 --- a/scripts/install-all.sh +++ b/scripts/install-all.sh @@ -12,7 +12,7 @@ echo "" echo "Install nushell from local..." echo "----------------------------------------------" -cargo install --force --path "$REPO_ROOT" --features=dataframe +cargo install --force --path "$REPO_ROOT" --features=dataframe,extra --locked NU_PLUGINS=( 'nu_plugin_inc' diff --git a/scripts/uninstall-all.sh b/scripts/uninstall-all.sh index f5cb261098..509f9af3f2 100755 --- a/scripts/uninstall-all.sh +++ b/scripts/uninstall-all.sh @@ -13,6 +13,7 @@ NU_PLUGINS=( 'nu_plugin_query' 'nu_plugin_example' 'nu_plugin_formats' + 'nu_plugin_custom_values' ) cargo uninstall nu diff --git a/toolkit.nu b/toolkit.nu index bd8ce1be58..60efd0385f 100644 --- a/toolkit.nu +++ b/toolkit.nu @@ -281,7 +281,7 @@ def build-nushell [features: string] { print $'(char nl)Building nushell' print '----------------------------' - cargo build --features $features + cargo build --features $features --locked } def build-plugin [] { @@ -338,7 +338,7 @@ export def install [ --all: bool # install all plugins with Nushell ] { touch crates/nu-cmd-lang/build.rs # needed to make sure `version` has the correct `commit_hash` - cargo install --path . --features ($features | str join ",") + cargo install --path . --features ($features | str join ",") --locked --force if not $all { return } @@ -351,6 +351,7 @@ export def install [ nu_plugin_custom_values, nu_plugin_formats, ] + for plugin in $plugins { $plugin | install-plugin }