File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 77# Last Modified : <2025-07-21>
88#
99# Make rawstr4c distribution file (tar.gz)
10+ #
11+ # Usage:
12+ #
13+ # .\make-distribution.ps1 [-upload]
1014# ---------------------------------------------------------------
1115
16+ param (
17+ [switch ]$upload
18+ )
19+
1220$files = @ ()
1321
1422# 获取相对路径的函数
@@ -38,3 +46,18 @@ $archiveName = "rawstr4c-$(Get-Date -Format 'yyyyMMdd').tar.gz"
3846$files | tar - czf $archiveName - T -
3947
4048Write-Host " 打包完成: $archiveName " - ForegroundColor Green
49+ Write-Host " 提示: 可指定 -upload 直接上传" - ForegroundColor Green
50+
51+ # 如果指定了 upload 参数,则上传到 fez
52+ if ($upload ) {
53+ Write-Host " 正在上传到 fez..." - ForegroundColor Yellow
54+
55+ try {
56+ fez upload -- file $archiveName
57+ Write-Host " 上传成功!" - ForegroundColor Green
58+ } catch {
59+ Write-Error " 上传失败: $_ "
60+ exit 1
61+ }
62+ }
63+
You can’t perform that action at this time.
0 commit comments