Skip to content

Commit

Permalink
Add documentation to nu_deps (nushell#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
kubouch committed Jan 31, 2023
1 parent e6f3fe8 commit ec6acdd
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions make_release/nu_deps.nu
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/env/bin nu
# Go through Nushell dependencies in the first wave and find the right ordering
#
# Recommended usage is via a module which allows you to process the output
# further.

# Extract target-specific dependencies from an opened Cargo.toml
def get-target-dependencies [] {
let target = ($in | get -i target)

Expand All @@ -19,8 +23,9 @@ def get-target-dependencies [] {
$res
}

# Gather dependencies for each Nushell crate
def nu-deps [] {
# For each Nushell crate in the first publishing wave, open its Cargo.toml and
# gather its dependencies.
def find-deps [] {
let second_wave = [ 'nu-command' ]
let third_wave = [ 'nu-cli' ]

Expand All @@ -45,8 +50,12 @@ def nu-deps [] {
}
}

# Find the right publish ordering of Nushell crates based on their dependencies
#
# Returns a list which you can process further, e.g.:
# > nu_deps | str join (',' + (char nl))
export def main [] {
let deps = nu-deps
let deps = find-deps

mut list = []

Expand Down

0 comments on commit ec6acdd

Please sign in to comment.