Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/scripts/release-guard.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict';
// 仅用于本次已授权的 v1.14.1;失败或部分发布必须人工核查,绝不覆盖资产。
// 仅用于本次已授权的 v1.14.2;失败或部分发布必须人工核查,绝不覆盖资产。
const fs = require('node:fs');
const path = require('node:path');
const os = require('node:os');
const crypto = require('node:crypto');
const { execFileSync } = require('node:child_process');
const VERSION = '1.14.1';
const VERSION = '1.14.2';
const TAG = `v${VERSION}`;
const ASSETS = ['infinitytime-theme.zip', 'infinitytime-plugin.zip'];
function insist(ok, message) { if (!ok) throw new Error(message); }
Expand All @@ -22,9 +22,9 @@ function guardRun(event, repository, mainSha, run, workflow) {
return mainSha;
}
function guardVersions(theme, plugin, release) {
insist(theme.match(/@version\s+([\d.]+)/)?.[1] === VERSION, '主题版本不是 1.14.1');
insist(plugin.match(/const VERSION = '([\d.]+)'/)?.[1] === VERSION, '插件版本不是 1.14.1');
insist(JSON.parse(release).tag_name === VERSION, '版本清单不是 1.14.1');
insist(theme.match(/@version\s+([\d.]+)/)?.[1] === VERSION, '主题版本不是 1.14.2');
insist(plugin.match(/const VERSION = '([\d.]+)'/)?.[1] === VERSION, '插件版本不是 1.14.2');
insist(JSON.parse(release).tag_name === VERSION, '版本清单不是 1.14.2');
}
function guardExisting(tagSha, release, sha, digests) {
if (!tagSha && !release) return 'create';
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
php tests/image-delete.php
php tests/media-lifetime.php
php tests/media-gd.php
php tests/media-command.php
php tests/media-temp.php
php tests/maintenance-state.php
for mode in rebuild-sync-failure rebuild-success rebuild-batch rebuild-restart rebuild-resume rebuild-start-reuse rebuild-no-original rebuild-missing-original rebuild-conversion-failure stale-poll finished-poll delete-non-plugin delete-rollback lease-conflict; do
php tests/maintenance-panel.php "$mode"
Expand Down Expand Up @@ -170,3 +172,25 @@ jobs:
for adapter in $adapters; do
php tests/typecho-integration.php "$adapter"
done

process-portability:
runs-on: windows-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.4']
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd, fileinfo
coverage: none
- name: Windows 外部进程与临时资源回归
shell: pwsh
run: |
php tests/media-command.php
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
php tests/media-temp.php
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ jobs:
dist/infinitytime-plugin.zip
body_path: dist/RELEASE_NOTES.md

# 一次性授权范围:只允许目标仓库 main 的完整 CI 发布 1.14.1。
release-1-14-1:
# 一次性授权范围:只允许目标仓库 main 的完整 CI 发布 1.14.2。
release-1-14-2:
if: >-
github.event_name == 'workflow_run' &&
github.repository == 'Thregren/InfinityTime' &&
Expand All @@ -77,7 +77,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: release-v1.14.1
group: release-v1.14.2
cancel-in-progress: false
steps:
- name: 在 checkout 前验证可信 main 和 CI 身份
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

## 功能特性

### v1.14.2 异常恢复与编辑一致性加固

分页自动滚动与主动调用共享同一请求结果;无 AbortController 或网络实现忽略 abort 时,超时/取消也会结束等待并隔离迟到响应。后台编辑字段、图集标题、图片元数据和排序使用同一主库保存点协议,字段失败不会留下半套新值,外层事务保持由调用方决定提交。本版在完整 CI 与发布校验通过后提供主题和插件更新包;不会自动部署线上站点。

外部转换用 PHP 7.4+ 的 argv 数组直接启动实际工具,避免只终止中间 shell 而让工具继续写入;日志输出被直接丢弃至系统空设备。Windows 禁止 .bat/.cmd 包装,须配置直接可执行的工具。该管理仅覆盖直接子进程,工具自行创建的后代仍须由主机/工具管理。临时 JPEG 使用随机目录(POSIX 0700;Windows 遵循主机临时目录 ACL),统一清理所有多帧结果;清理被权限或文件系统阻止时记录警告,不掩盖原转换错误。

### v1.14.1 性能与可靠性加固

维护任务身份与原子检查点、聚合字段事务回滚、Mysqli 主库一致性修复、低内存孤儿引用扫描,并扩充官方 Typecho、多 PHP 和多数据库集成验证。1.14.0 的相册工作流与浏览功能全部保留。
Expand Down Expand Up @@ -96,6 +102,8 @@ php tests/field-sync.php
php tests/image-delete.php
php tests/media-lifetime.php
php tests/media-gd.php
php tests/media-command.php
php tests/media-temp.php
php tests/maintenance-state.php
php tests/maintenance-panel.php
php tests/admin-workflow.php
Expand Down Expand Up @@ -235,4 +243,4 @@ git tag v1.7.0 && git push origin v1.7.0

### 本次固定版本发布

1.14.1 使用额外的受控发布入口:只有本仓库 main 的完整 CI 成功且 SHA 仍为当前主线,才可创建 v1.14.1 与两份 ZIP。该入口固定版本,不能自动发布未来版本;已有完整发布只核验,不覆盖。匿名 CI 元数据查询、主线变化、版本不符或部分发布均会停止;任务失败后需核对 tag、draft 及资产状态。原手动 tag 发布流程保持。
1.14.2 使用额外的受控发布入口:只有本仓库 main 的完整 CI 成功且 SHA 仍为当前主线,才可创建 v1.14.2 与两份 ZIP。该入口固定版本,不能自动发布未来版本;已有完整发布只核验,不覆盖。匿名 CI 元数据查询、主线变化、版本不符或部分发布均会停止;任务失败后需核对 tag、draft 及资产状态。原手动 tag 发布流程保持。
1 change: 1 addition & 0 deletions tests/admin-workflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function __construct() { $this->pdo = new \PDO('sqlite::memory:', null, n
public static function get(): self { return self::$instance; }
public function getPrefix(): string { return 'admin_'; }
public function getAdapterName(): string { return $this->adapter; }
public function selectDb($op) { return $this->pdo; }
public function select(...$fields): Query { return new Query('select', '', $fields); }
public function insert($table): Query { return new Query('insert', $table); }
public function update($table): Query { return new Query('update', $table); }
Expand Down
Loading
Loading