added
This commit is contained in:
commit
8313c5c6b5
84 files changed
+4337
No files matched your search
@@ -0,0 +1,19 @@
|
||||
[CmdletBinding()]
|
||||
param([Parameter(Mandatory=$true)][switch]$ConfirmExternalSend)
|
||||
$ErrorActionPreference = "Stop"
|
||||
foreach ($name in @('POSTMARK_SERVER_TOKEN','SCHEDULING_TEST_DATABASE','SCHEDULING_TEST_SENDER','SCHEDULING_TEST_RECIPIENT','SCHEDULING_TEST_SUBJECT','SCHEDULING_TEST_MESSAGE_BODY')) {
|
||||
if ([string]::IsNullOrWhiteSpace([Environment]::GetEnvironmentVariable($name))) { throw "Required environment configuration is missing: $name" }
|
||||
}
|
||||
$projectRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
|
||||
$pythonCommand = Get-Command python -ErrorAction SilentlyContinue
|
||||
if (-not $pythonCommand) { throw "Python 3.11 or newer must be available on PATH." }
|
||||
$prior = $env:SCHEDULING_AUTHORIZED_SUPERVISED_TEST
|
||||
try {
|
||||
$env:SCHEDULING_AUTHORIZED_SUPERVISED_TEST = "1"
|
||||
$env:PYTHONPATH = Join-Path $projectRoot "src"
|
||||
& $pythonCommand.Source (Join-Path $PSScriptRoot "send_supervised_invite_confirmation.py")
|
||||
exit $LASTEXITCODE
|
||||
} finally {
|
||||
$env:SCHEDULING_AUTHORIZED_SUPERVISED_TEST = $prior
|
||||
Remove-Item Env:\PYTHONPATH -ErrorAction SilentlyContinue
|
||||
}
|
||||
Reference in new issue
Block a user