-
Notifications
You must be signed in to change notification settings - Fork 0
/
Invoke-Uv.ps1
36 lines (34 loc) · 993 Bytes
/
Invoke-Uv.ps1
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
29
30
31
32
33
34
35
36
<#.SYNOPSIS
Invoke `uv`.#>
[CmdletBinding(PositionalBinding = $False)]
Param(
[switch]$Sync,
[switch]$Update,
[switch]$Low,
[switch]$High,
[switch]$Build,
[switch]$Force,
[switch]$CI,
[switch]$Locked,
[switch]$Devcontainer,
[string]$PythonVersion = (Get-Content '.python-version'),
[string]$PylanceVersion = (Get-Content '.pylance-version'),
[Parameter(ValueFromRemainingArguments = $True)][string[]]$Run
)
. ./dev.ps1
$CI = (New-Switch $Env:SYNC_ENV_DISABLE_CI (New-Switch $Env:CI))
$InvokeUvArgs = @{
Sync = $Sync
Update = $Update
Low = $Low
High = $High
Build = $Build
Force = $Force
CI = $CI
Locked = $CI
Devcontainer = (New-Switch $Env:SYNC_ENV_DISABLE_DEVCONTAINER (New-Switch $Env:DEVCONTAINER))
PythonVersion = $PythonVersion
PylanceVersion = $PylanceVersion
Run = $Run
}
Invoke-Uv @InvokeUvArgs