mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-28 20:48:52 +03:00
bf82136466
* chore(licenses): api Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(licenses): scripts Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): cli/core Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): cli/tauri-bundler Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): workflows Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): require license_template in rust Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-api Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-build Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-codegen Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-macros Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-updater Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-utils Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): examples Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): cli/tauri.js Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): changefile Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): place both licenses in root Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): package.json SPDX Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): SPDX everywhere Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * fix(tauri.js): tests more time for ubuntu Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): commons conservancy language Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): add spdx file Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * fix(license): clippy Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): language Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>
55 lines
1.1 KiB
PowerShell
Executable File
55 lines
1.1 KiB
PowerShell
Executable File
#!/usr/bin/env pwsh
|
|
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# note: you can pass in the cargo sub-commands used to check manually.
|
|
# allowed commands: check, clippy, fmt, test
|
|
# default: clippy, fmt, test
|
|
|
|
# set the script arguments if none are found
|
|
if(-Not $args) {
|
|
$args=@("clippy","fmt","test")
|
|
}
|
|
|
|
# exit the script early if the last command returned an error
|
|
function check_error {
|
|
if($LASTEXITCODE -ne 0 ) {
|
|
Exit $LASTEXITCODE
|
|
}
|
|
}
|
|
|
|
function run {
|
|
$command, $_args = $args
|
|
|
|
Write-Output "[$command]"
|
|
cargo $command --workspace --all-targets --all-features $_args
|
|
check_error
|
|
}
|
|
|
|
foreach ($command in $args) {
|
|
Switch ($command) {
|
|
"check" {
|
|
run check
|
|
break
|
|
}
|
|
"test" {
|
|
run test
|
|
break
|
|
}
|
|
"clippy" {
|
|
run clippy "--" -D warnings
|
|
break
|
|
}
|
|
"fmt" {
|
|
Write-Output "[$command] checking formatting"
|
|
cargo +nightly fmt "--" --check
|
|
check_error
|
|
}
|
|
default {
|
|
Write-Output "[cargo-check.ps1] Unknown cargo sub-command: $command"
|
|
Exit 1
|
|
}
|
|
}
|
|
}
|