Map out dependencies between Windows scripts (#6112)
* Map dependencies between Windows scripts * Skip unix-specific command on Windows * Handle missing directory * Explicitly run with PowerShell This makes the scripts with work CMD out-of-the-box.
This commit is contained in:
		@ -3,9 +3,13 @@
 | 
			
		||||
$ErrorActionPreference = 'Stop'
 | 
			
		||||
$PSNativeCommandUseErrorActionPreference = $true
 | 
			
		||||
 | 
			
		||||
rm -Recurse -Force rust/kcl-wasm-lib/pkg
 | 
			
		||||
if (Test-Path rust/kcl-wasm-lib/pkg) {
 | 
			
		||||
    rm -Recurse -Force rust/kcl-wasm-lib/pkg
 | 
			
		||||
}
 | 
			
		||||
mkdir -p rust/kcl-wasm-lib/pkg
 | 
			
		||||
rm -Recurse -Force rust/kcl-lib/bindings
 | 
			
		||||
if (Test-Path rust/kcl-lib/bindings) {
 | 
			
		||||
    rm -Recurse -Force rust/kcl-lib/bindings
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cd rust
 | 
			
		||||
$env:RUSTFLAGS='--cfg getrandom_backend="wasm_js"'
 | 
			
		||||
 | 
			
		||||
@ -3,9 +3,13 @@
 | 
			
		||||
$ErrorActionPreference = 'Stop'
 | 
			
		||||
$PSNativeCommandUseErrorActionPreference = $true
 | 
			
		||||
 | 
			
		||||
rm -Recurse -Force rust/kcl-wasm-lib/pkg
 | 
			
		||||
if (Test-Path rust/kcl-wasm-lib/pkg) {
 | 
			
		||||
    rm -Recurse -Force rust/kcl-wasm-lib/pkg
 | 
			
		||||
}
 | 
			
		||||
mkdir -p rust/kcl-wasm-lib/pkg
 | 
			
		||||
rm -Recurse -Force rust/kcl-lib/bindings
 | 
			
		||||
if (Test-Path rust/kcl-lib/bindings) {
 | 
			
		||||
    rm -Recurse -Force rust/kcl-lib/bindings
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cd rust
 | 
			
		||||
$env:RUSTFLAGS='--cfg getrandom_backend="wasm_js"'
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user