Skip to content

Commit

Permalink
Refactor cargo-build-nu
Browse files Browse the repository at this point in the history
  • Loading branch information
nibon7 committed Jun 29, 2023
1 parent b44926d commit c3f76c3
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/release-pkg.nu
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,7 @@ if $os in [$USE_UBUNTU, 'macos-latest'] {
# Build for Windows without static-link-openssl feature
# ----------------------------------------------------------------------------
if $os in ['windows-latest'] {
# let-env CARGO_BUILD_TARGET = $target
if ($flags | str trim | is-empty) {
cargo build --release --all --target $target
} else {
cargo build --release --all --target $target $flags
}
cargo-build-nu $flags
}

# ----------------------------------------------------------------------------
Expand Down Expand Up @@ -194,11 +189,13 @@ if $os in [$USE_UBUNTU, 'macos-latest'] {
}

def 'cargo-build-nu' [ options: string ] {
if ($options | str trim | is-empty) {
cargo build --release --all --target $target --features=static-link-openssl
let features = if $os == 'windows-latest' {
''
} else {
cargo build --release --all --target $target --features=static-link-openssl $options
'--features=static-link-openssl'
}

cargo build --release --all --target $target $features $options
}

# Print a horizontal line marker
Expand Down

0 comments on commit c3f76c3

Please sign in to comment.