| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- $ErrorActionPreference = 'Stop'
- $ProgressPreference = 'SilentlyContinue'
- $root = Split-Path -Parent $PSScriptRoot
- $dist = Join-Path $root 'dist'
- $zip = Join-Path $dist 'openclaw-wechat-skill-v1.2.2.zip'
- New-Item -ItemType Directory -Path $dist -Force | Out-Null
- if (Test-Path $zip) { Remove-Item -Force $zip }
- Add-Type -AssemblyName System.IO.Compression
- Add-Type -AssemblyName System.IO.Compression.FileSystem
- $items = @(
- 'wechat',
- 'workflows',
- '__config',
- 'daemon',
- 'deploy-to-openclaw.ps1',
- 'deploy-to-openclaw.js',
- 'deploy-to-openclaw.sh',
- 'check-deployment.js',
- 'quick-start.sh',
- 'README.md',
- 'AGENT-PROMPT.md'
- )
- $archive = [System.IO.Compression.ZipFile]::Open($zip, [System.IO.Compression.ZipArchiveMode]::Create)
- try {
- foreach ($item in $items) {
- $full = Join-Path $root $item
- if (-not (Test-Path $full)) { Write-Warning "skip missing: $item"; continue }
- $info = Get-Item $full
- if ($info.PSIsContainer) {
- Get-ChildItem -Path $full -Recurse -File | ForEach-Object {
- $rel = $_.FullName.Substring($root.Length + 1).Replace('\','/')
- [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($archive, $_.FullName, $rel) | Out-Null
- }
- } else {
- $rel = $info.FullName.Substring($root.Length + 1).Replace('\','/')
- [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($archive, $info.FullName, $rel) | Out-Null
- }
- }
- } finally {
- $archive.Dispose()
- }
- Write-Host ("OK: {0} ({1:N0} bytes)" -f $zip, (Get-Item $zip).Length)
|