项目初始化
This commit is contained in:
17
send-wecom.ps1
Normal file
17
send-wecom.ps1
Normal file
@@ -0,0 +1,17 @@
|
||||
# Push daily report to WeCom group webhook
|
||||
param(
|
||||
[string]$ReportPath
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
Set-Location $Root
|
||||
|
||||
$python = "python"
|
||||
$args = @("-m", "daily", "push")
|
||||
if ($ReportPath) { $args += $ReportPath }
|
||||
|
||||
& $python @args
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "daily push failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
Reference in New Issue
Block a user