This repository has been archived by the owner on Dec 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
justfile-windows
28 lines (22 loc) · 1.81 KB
/
justfile-windows
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
set shell := ["powershell.exe", "-c"]
export RUST_LOG := "wasmcloud_host=debug,wasmcloud_provider=debug,main=debug"
export PFX_PASSWORD := "testing"
export CONFIG_DIR := env_var_or_default('CONFIG_DIR', '$HOME\.krustlet\config')
build +FLAGS='--no-default-features --features rustls-tls':
cargo build {{FLAGS}}
test +FLAGS='--no-default-features --features rustls-tls':
cargo fmt --all -- --check
cargo clippy {{FLAGS}}
@# You can't pass in features with the --workspace flag, so we need to
@# change directory into each crate for testing. This will result in some
@# "not_used" errors as it isn't checking the whole workspace, but it should be
@# sufficient for now. We may want to consider improving things using `cfg`
@# directives to always pull in rustls-tls on windows machines
Get-ChildItem crates -Name | ForEach-Object -Process { Push-Location .\crates\$_; cargo test {{FLAGS}}; Pop-Location }
test-e2e +FLAGS='--no-default-features --features rustls-tls':
cargo test --test integration_tests {{FLAGS}}
run +FLAGS='--no-default-features --features rustls-tls': bootstrap
$env:KUBECONFIG = "$(Invoke-Expression "echo $env:CONFIG_DIR")\kubeconfig-wasmcloud"; cargo run --bin krustlet-wasmcloud {{FLAGS}} -- --node-name krustlet-wasmcloud --port 3000 --bootstrap-file "$(Invoke-Expression "echo $env:CONFIG_DIR")\bootstrap.conf" --cert-file "$(Invoke-Expression "echo $env:CONFIG_DIR")\krustlet-wasmcloud.crt" --private-key-file "$(Invoke-Expression "echo $env:CONFIG_DIR")\krustlet-wasmcloud.key"
bootstrap:
@# This is to get around an issue with the default function returning a string that gets escaped
@if ( -not (Test-Path -LiteralPath "$(Invoke-Expression "echo $env:CONFIG_DIR")\bootstrap.conf") ) { $env:CONFIG_DIR = Invoke-Expression "echo $env:CONFIG_DIR"; .\scripts\bootstrap.ps1 }