rust: shellcheck setup hooks
This commit is contained in:
parent
9220a19a4d
commit
d5013e942e
@ -1,3 +1,5 @@
|
||||
# shellcheck shell=bash disable=SC2154,SC2164
|
||||
|
||||
cargoBuildHook() {
|
||||
echo "Executing cargoBuildHook"
|
||||
|
||||
@ -7,9 +9,10 @@ cargoBuildHook() {
|
||||
# separateDebugInfo.
|
||||
export "CARGO_PROFILE_${cargoBuildType@U}_STRIP"=false
|
||||
|
||||
if [ ! -z "${buildAndTestSubdir-}" ]; then
|
||||
if [ -n "${buildAndTestSubdir-}" ]; then
|
||||
# ensure the output doesn't end up in the subdirectory
|
||||
export CARGO_TARGET_DIR="$(pwd)/target"
|
||||
CARGO_TARGET_DIR="$(pwd)/target"
|
||||
export CARGO_TARGET_DIR
|
||||
|
||||
pushd "${buildAndTestSubdir}"
|
||||
fi
|
||||
@ -37,7 +40,7 @@ cargoBuildHook() {
|
||||
echoCmd 'cargoBuildHook flags' "${flagsArray[@]}"
|
||||
@setEnv@ cargo build "${flagsArray[@]}"
|
||||
|
||||
if [ ! -z "${buildAndTestSubdir-}" ]; then
|
||||
if [ -n "${buildAndTestSubdir-}" ]; then
|
||||
popd
|
||||
fi
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
# shellcheck shell=bash disable=SC2154,SC2164
|
||||
|
||||
cargoCheckHook() {
|
||||
echo "Executing cargoCheckHook"
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
# shellcheck shell=bash disable=SC2154,SC2164
|
||||
|
||||
cargoNextestHook() {
|
||||
echo "Executing cargoNextestHook"
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
# shellcheck shell=bash disable=SC2154,SC2164
|
||||
|
||||
maturinBuildHook() {
|
||||
echo "Executing maturinBuildHook"
|
||||
|
||||
@ -6,7 +8,7 @@ maturinBuildHook() {
|
||||
# Put the wheel to dist/ so that regular Python tooling can find it.
|
||||
local dist="$PWD/dist"
|
||||
|
||||
if [ ! -z "${buildAndTestSubdir-}" ]; then
|
||||
if [ -n "${buildAndTestSubdir-}" ]; then
|
||||
pushd "${buildAndTestSubdir}"
|
||||
fi
|
||||
|
||||
@ -25,7 +27,7 @@ maturinBuildHook() {
|
||||
echoCmd 'maturinBuildHook flags' "${flagsArray[@]}"
|
||||
@setEnv@ maturin build "${flagsArray[@]}"
|
||||
|
||||
if [ ! -z "${buildAndTestSubdir-}" ]; then
|
||||
if [ -n "${buildAndTestSubdir-}" ]; then
|
||||
popd
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user