Compare commits

...

3 Commits

Author SHA1 Message Date
shenlei
cf6cc1d21a fix: 打包副本包含 AutoPacking 脚本 2026-07-20 15:03:21 +09:00
shenlei
cede7978e4 fix: 输出完整归档日志 2026-07-20 15:00:30 +09:00
shenlei
f0c6a2d9b6 fix: 完整显示打包历史信息 2026-07-20 14:57:49 +09:00
5 changed files with 29 additions and 14 deletions

View File

@ -105,6 +105,7 @@ COPY_ITEMS = [
"readoor.xcodeproj",
"readoorTests",
"Vendor",
"AutoPacking",
"Podfile",
"Pods",
"Podfile.lock",

View File

@ -787,7 +787,6 @@ async def build_project(task_id: str, task, config_data: dict, build_dir: Path)
"-archivePath", str(archive_path),
"-derivedDataPath", str(export_path / "derived_data"),
"-destination", "generic/platform=ios",
"-quiet",
cwd=str(build_dir),
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.STDOUT,

View File

@ -7,7 +7,7 @@ global.fetch = vi.fn()
window.open = vi.fn()
const mockTasks = [
{ id: '1', app_name: 'App1', build_type: 'Ad_Hoc', scheme_name: 'sch1', status: 'completed', created_at: '2024-01-01T10:00:00', dsym_path: '/path/dsym', oss_url: 'https://oss.com/app1.ipa', qr_code_path: '/path/qr.png' },
{ id: '1', app_name: 'App1', build_type: 'Ad_Hoc', scheme_name: 'readoor31OtherPayLongSchemeName', status: 'completed', created_at: '2024-01-01T10:00:00', dsym_path: '/path/dsym', oss_url: 'https://oss.com/app1.ipa', qr_code_path: '/path/qr.png' },
{ id: '2', app_name: 'App2', build_type: 'App_Store', scheme_name: 'sch2', status: 'failed', created_at: '2024-01-02T10:00:00', error_message: '构建失败', error_category: 'compilation' },
{ id: '3', app_name: 'App3', build_type: 'Ad_Hoc', scheme_name: 'sch1', status: 'pending', created_at: '2024-01-03T10:00:00' },
]
@ -148,6 +148,18 @@ describe('HistoryView.vue', () => {
expect(wrapper.vm.statusText('failed')).toBe('失败')
})
it('时间仅显示月和日Scheme 与状态单元格允许完整换行', async () => {
const router = createMockRouter()
const wrapper = mount(HistoryView, {
global: { plugins: [router] },
})
await flushPromises()
expect(wrapper.vm.formatTime('2024-07-20T10:00:00')).toBe('7/20')
expect(wrapper.find('.scheme-cell').text()).toBe('readoor31OtherPayLongSchemeName')
expect(wrapper.find('.status-cell').text()).toContain('已完成')
})
it('点击查看日志跳转', async () => {
const router = createMockRouter()
router.push = vi.fn()

View File

@ -45,7 +45,7 @@
{{ task.build_type }}
</span>
</td>
<td>{{ task.scheme_name }}</td>
<td class="scheme-cell">{{ task.scheme_name }}</td>
<td class="status-cell">
<span :class="['task-status', `status-${task.status}`]">{{ statusText(task.status) }}</span>
<span v-if="task.status === 'failed' && task.error_category" class="error-cat-badge">
@ -308,7 +308,7 @@ const deleteTask = async (taskId) => {
const formatTime = (t) => {
if (!t) return '-'
const d = t.endsWith('Z') || t.includes('+') ? new Date(t) : new Date(t + 'Z')
return d.toLocaleString()
return `${d.getMonth() + 1}/${d.getDate()}`
}
const formatDuration = (started, completed) => {
@ -361,13 +361,13 @@ const errorCategoryLabel = (cat) => {
.config-table th, .config-table td { padding: 12px; text-align: left; border-bottom: 1px solid #f0f0f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.config-table th { background: #fafafa; font-weight: 500; color: #666; font-size: 13px; }
.config-table td { font-size: 14px; }
.config-table th:nth-child(1) { width: 14%; }
.config-table th:nth-child(2) { width: 14%; }
.config-table th:nth-child(3) { width: 8%; }
.config-table th:nth-child(4) { width: 10%; }
.config-table th:nth-child(5) { width: 12%; }
.config-table th:nth-child(6) { width: 16%; }
.config-table th:nth-child(7) { width: 26%; }
.config-table th:nth-child(1) { width: 10%; }
.config-table th:nth-child(2) { width: 12%; }
.config-table th:nth-child(3) { width: 9%; }
.config-table th:nth-child(4) { width: 18%; }
.config-table th:nth-child(5) { width: 17%; }
.config-table th:nth-child(6) { width: 12%; }
.config-table th:nth-child(7) { width: 22%; }
.config-table tr:hover { background: #fafafa; }
.build-type-badge { padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
@ -377,11 +377,12 @@ const errorCategoryLabel = (cat) => {
.action-btns { white-space: normal; }
.action-btns .action-btn { margin-right: 6px; margin-bottom: 4px; display: inline-block; vertical-align: middle; }
.download-cell { white-space: normal; }
.scheme-cell { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
.action-btn { padding: 4px 12px; border: 1px solid #d9d9d9; border-radius: 4px; background: white; cursor: pointer; font-size: 12px; }
.action-btn:hover { border-color: #1890ff; color: #1890ff; }
.task-status { padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-cell { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
.status-cell { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
.status-cell .task-status, .status-cell .error-cat-badge { display: inline-block; margin-bottom: 4px; }
.status-pending { background: #f0f0f0; color: #666; }
.status-running { background: #e6f7ff; color: #1890ff; }

View File

@ -41,7 +41,9 @@ def tmp_dirs(tmp_path):
(source_dir / "Pods").mkdir()
(source_dir / "Podfile.lock").write_text("PODFILE CHECKSUM: abc")
(source_dir / "readoor.xcworkspace").mkdir()
(source_dir / "AutoPacking").mkdir()
whitelist_script = source_dir / "AutoPacking" / "obfuscation" / "generate_image_whitelist.py"
whitelist_script.parent.mkdir(parents=True)
whitelist_script.write_text("# whitelist generator")
vendor_dir = source_dir / "Vendor" / "RDEpubReaderView"
vendor_dir.mkdir(parents=True)
(vendor_dir / "RDEpubReaderView.podspec").write_text("Pod::Spec.new do |s| end")
@ -161,7 +163,7 @@ async def test_copy_source_code(tmp_dirs, log_streamer):
assert (result / "Podfile.lock").exists()
assert (result / "readoor.xcworkspace").exists()
assert (result / "Vendor" / "RDEpubReaderView" / "RDEpubReaderView.podspec").exists()
assert not (result / "AutoPacking").exists()
assert (result / "AutoPacking" / "obfuscation" / "generate_image_whitelist.py").exists()
async def test_copy_source_code_normalizes_lowercase_podfile(tmp_dirs, log_streamer):