Skip to content

Commit 93bf287

Browse files
committed
fix wwwroot
1 parent 6df52b9 commit 93bf287

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
runs-on: self-hosted
1414

1515
steps:
16+
- run: git config --global core.longPaths true
1617
- name: Checkout
1718
uses: actions/checkout@v4
1819
with:
1920
fetch-depth: 0
2021
submodules: recursive
21-
clean: false
2222

2323
- name: Checkout Assets
2424
uses: clansty/checkout@main
@@ -43,14 +43,6 @@ jobs:
4343
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
4444
}
4545
46-
- name: Install Frontend Dependencies
47-
shell: powershell
48-
run: |
49-
corepack enable
50-
Push-Location MaiChartManager\Front
51-
pnpm install
52-
Pop-Location
53-
5446
5547
- name: Build
5648
shell: powershell

MaiChartManager/Front/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import './global.sass';
1313

1414
createApp(App)
1515
.use(router)
16-
.use(i18n)
16+
.use(i18n as any)
1717
.use(posthog)
1818
.use(sentry)
1919
.mount('#app');

Packaging/Build.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ try {
103103
Write-Host "Building Frontend..." -ForegroundColor Cyan
104104
Push-Location "$ProjectRoot\MaiChartManager\Front"
105105
try {
106-
cmd /c pnpm build
106+
pnpm install
107+
if ($LASTEXITCODE -ne 0) { throw "pnpm install failed with exit code $LASTEXITCODE" }
108+
Write-Host "Node: $(node -v) | pnpm: $(pnpm -v)" -ForegroundColor Yellow
109+
Write-Host "Working dir: $(Get-Location)" -ForegroundColor Yellow
110+
Write-Host "unocss/reset exists: $(Test-Path node_modules\@unocss\reset\tailwind-compat.css)" -ForegroundColor Yellow
111+
pnpm build
112+
if ($LASTEXITCODE -ne 0) { throw "Frontend build failed with exit code $LASTEXITCODE" }
107113
} finally {
108114
Pop-Location
109115
}
@@ -119,10 +125,13 @@ try {
119125
Write-Host "Using Configuration: $ConfigName" -ForegroundColor Yellow
120126

121127
dotnet publish -p:Configuration=$ConfigName
128+
if ($LASTEXITCODE -ne 0) { throw "dotnet publish failed with exit code $LASTEXITCODE" }
122129
} finally {
123130
Pop-Location
124131
}
125132

133+
Copy-Item "$ProjectRoot\MaiChartManager\wwwroot" "$PSScriptRoot\Pack\wwwroot" -Recurse -Force
134+
126135
# ==========================================
127136
# 6. 准备打包目录
128137
# ==========================================

0 commit comments

Comments
 (0)