summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <faern@faern.net>2023-03-23 16:54:12 +0100
committerLinus Färnstrand <linus@mullvad.net>2023-03-24 10:30:35 +0100
commit3598eead7d65184dcf83a27a79b9b11887d70e2b (patch)
treebdd6c96e7f1dda4ceeb332c2fc4e2f29b3a9a677
parentf0be7e4bab4bac137a574569a8ebc381d98cc9f5 (diff)
downloadmullvadvpn-2023.3-beta1.tar.xz
mullvadvpn-2023.3-beta1.zip
Use `rm` instead of `cargo clean` to work better in containers2023.3-beta1
Since the target dir is a container mount, cargo clean fails to remove the directory, causing the entire build to fail
-rwxr-xr-xbuild-apk.sh2
-rwxr-xr-xbuild.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/build-apk.sh b/build-apk.sh
index 0088c29346..ddcf825e6f 100755
--- a/build-apk.sh
+++ b/build-apk.sh
@@ -59,7 +59,7 @@ fi
if [[ "$BUILD_TYPE" == "release" && "$PRODUCT_VERSION" != *"-dev-"* ]]; then
echo "Removing old Rust build artifacts"
- cargo clean
+ (shopt -s dotglob; rm -rf "${CARGO_TARGET_DIR:?}/*")
CARGO_ARGS+=" --locked"
fi
diff --git a/build.sh b/build.sh
index 9bf315604e..ca88f76094 100755
--- a/build.sh
+++ b/build.sh
@@ -129,7 +129,7 @@ fi
if [[ "$IS_RELEASE" == "true" ]]; then
log_info "Removing old Rust build artifacts..."
- cargo clean
+ (shopt -s dotglob; rm -rf "${CARGO_TARGET_DIR:?}/*")
# Will not allow an outdated lockfile in releases
CARGO_ARGS+=(--locked)