Bläddra i källkod

Helper scripts to run cargo clippy + test for all features (#874)

chip 5 år sedan
förälder
incheckning
8cba944c11
2 ändrade filer med 30 tillägg och 0 borttagningar
  1. 14 0
      .scripts/cargo-check.ps1
  2. 16 0
      .scripts/cargo-check.sh

+ 14 - 0
.scripts/cargo-check.ps1

@@ -0,0 +1,14 @@
+Write-Output "Checking tauri crates"
+
+
+$commands=@("clippy","test")
+$features=@("no-server","embedded-server")
+foreach ($command in $commands) {
+  foreach ($feature in $features) {
+    Write-Output "[$command][$feature] checking tauri"
+    cargo $command --manifest-path tauri/Cargo.toml --all-targets --features "$feature,cli,all-api"
+  }
+
+  Write-Output "[$command] checking other crates"
+  cargo $command --workspace --exclude tauri --all-targets --all-features
+}

+ 16 - 0
.scripts/cargo-check.sh

@@ -0,0 +1,16 @@
+#!/usr/bin/env sh
+set -e
+
+echo "Checking tauri crates"
+
+for command in "clippy" "test"
+do
+  for feature in "no-server" "embedded-server"
+  do
+    echo "[$command][$feature] checking tauri"
+    cargo "$command" --manifest-path tauri/Cargo.toml --all-targets --features "$feature,cli,all-api"
+  done
+
+  echo "[$command] checking other crates"
+  cargo "$command" --workspace --exclude tauri --all-targets --all-features
+done