-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInvoke-Uv.ps1
More file actions
37 lines (36 loc) · 1.08 KB
/
Invoke-Uv.ps1
File metadata and controls
37 lines (36 loc) · 1.08 KB
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
37
<#.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(ValueFromPipeline, ValueFromRemainingArguments)][string[]]$Run
)
Begin {
. ./dev
$_CI = (New-Switch $Env:SYNC_ENV_DISABLE_CI (New-Switch $Env:CI))
$Locked = New-Switch $_CI $Locked
$InvokeUvArgs = @{
Sync = $Sync
Update = $Update
Low = $Low
High = $High
Build = $Build
Force = $Force
_CI = $_CI
Locked = $Locked
Devcontainer = (New-Switch $Env:SYNC_ENV_DISABLE_DEVCONTAINER (New-Switch $Env:DEVCONTAINER))
PythonVersion = $PythonVersion
PylanceVersion = $PylanceVersion
}
}
Process { Invoke-Uv @InvokeUvArgs $Run }