10 Commits

Author SHA1 Message Date
Gitea Actions
2cb4ac62a2 [skip ci] Update version to 1.4.8 2025-10-09 17:52:06 +08:00
Gitea Actions
2ba26b79dd 强制空提交 2025-10-09 17:51:47 +08:00
Gitea Actions
43b54a99c7 [skip ci] Update version to 1.4.7 2025-10-09 17:36:04 +08:00
Gitea Actions
cab5b606a9 解决job构建失败的问题 2025-10-09 17:32:05 +08:00
Gitea Actions
0c6d0608c5 [skip ci] Update version to 2025-10-09 17:30:36 +08:00
Gitea Actions
2734d375c2 解决job构建失败的问题 2025-10-09 17:30:19 +08:00
Gitea Actions
286fa4e697 [skip ci] Update version to 2025-10-09 17:24:44 +08:00
Gitea Actions
39ba4f9324 修改网络问题 2025-10-09 17:24:25 +08:00
Gitea Actions
8f30ab9790 [skip ci] Update version to 2025-10-09 17:21:38 +08:00
jjz
41b686fff6 修改网络问题 2025-10-09 17:21:19 +08:00
3 changed files with 129 additions and 40 deletions

View File

@@ -81,23 +81,13 @@ jobs:
# Retry mechanism: maximum 3 attempts
$SUCCESS = $false
$VERSION = ""
for ($i = 1; $i -le 3; $i++) {
Write-Host "Attempt $i to create version record..."
$output = python .gitea/scripts/gui_version_creator.py | Out-String
python .gitea/scripts/gui_version_creator.py
if ($LASTEXITCODE -eq 0) {
Write-Host "Version record created successfully"
$SUCCESS = $true
# Extract version from JSON output (last line)
$jsonLine = ($output -split "`n" | Where-Object { $_ -match '^\{' } | Select-Object -Last 1)
if ($jsonLine) {
$json = $jsonLine | ConvertFrom-Json
$VERSION = $json.version
Write-Host "Created version: $VERSION"
}
break
} else {
Write-Host "Attempt $i failed"
@@ -115,8 +105,14 @@ jobs:
exit 1
}
# Set version for next steps
echo "VERSION=$VERSION" >> $env:GITHUB_ENV
# Verify version was updated
if (Test-Path "config.py") {
$configContent = Get-Content "config.py" -Raw
if ($configContent -match 'APP_VERSION\s*=\s*"([\d.]+)"') {
$VERSION = $matches[1]
Write-Host "Version updated successfully: $VERSION"
}
}
env:
DB_HOST: 8.155.9.53
DB_NAME: ai_web
@@ -130,7 +126,16 @@ jobs:
shell: powershell
run: |
Write-Host "Committing version changes..."
Write-Host "New version: $env:VERSION"
# Read version from config.py
$VERSION = ""
if (Test-Path "config.py") {
$configContent = Get-Content "config.py" -Raw
if ($configContent -match 'APP_VERSION\s*=\s*"([\d.]+)"') {
$VERSION = $matches[1]
Write-Host "New version: $VERSION"
}
}
git config user.name "Gitea Actions"
git config user.email "actions@gitea.local"
@@ -140,7 +145,7 @@ jobs:
$hasChanges = git diff --staged --quiet
if ($LASTEXITCODE -ne 0) {
git commit -m "[skip ci] Update version to $env:VERSION"
git commit -m "[skip ci] Update version to $VERSION"
git push origin master
Write-Host "Version changes committed and pushed"
} else {
@@ -152,30 +157,22 @@ jobs:
if: always()
shell: powershell
run: |
$summaryFile = $env:GITHUB_STEP_SUMMARY
if ($summaryFile) {
"## GUI Version Release Summary" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
"" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
if ("${{ job.status }}" -eq "success") {
"**Status**: Version release succeeded" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
} else {
"**Status**: Version release failed" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
# Read version from config.py
$VERSION = "Unknown"
if (Test-Path "config.py") {
$configContent = Get-Content "config.py" -Raw
if ($configContent -match 'APP_VERSION\s*=\s*"([\d.]+)"') {
$VERSION = $matches[1]
}
"**Author**: ${{ github.actor }}" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
"**Branch**: ${{ github.ref_name }}" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
"**Time**: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
"**Commit**: ${{ github.sha }}" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
} else {
Write-Host "=========================================="
Write-Host "GUI Version Release Summary"
Write-Host "=========================================="
Write-Host "Author: ${{ github.actor }}"
Write-Host "Branch: ${{ github.ref_name }}"
Write-Host "Time: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
Write-Host "Commit: ${{ github.sha }}"
Write-Host "Status: ${{ job.status }}"
Write-Host "=========================================="
}
Write-Host "=========================================="
Write-Host "GUI Version Release Summary"
Write-Host "=========================================="
Write-Host "Author: ${{ github.actor }}"
Write-Host "Branch: ${{ github.ref_name }}"
Write-Host "Version: $VERSION"
Write-Host "Time: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
Write-Host "Commit: ${{ github.sha }}"
Write-Host "=========================================="

View File

@@ -37,7 +37,7 @@ FUTURE_TIMEOUT = 300 # 5分钟
# 终端日志配置(简化)
LOG_LEVEL = "INFO"
VERSION = "1.0"
APP_VERSION = "1.0.1" # 应用版本号(用于版本检查)
APP_VERSION = "1.4.8" # 应用版本号(用于版本检查)
# GUI配置
WINDOW_TITLE = "AI回复连接入口-V1.0"

92
version_history.json Normal file
View File

@@ -0,0 +1,92 @@
[
{
"version": "1.4.8",
"update_type": "patch",
"content": "强制空提交",
"author": "Gitea Actions",
"commit_hash": "2ba26b79dd43512e13cee8600f7e35441d3e9f92",
"commit_short_hash": "2ba26b79",
"branch": "master",
"release_time": "2025-10-09 17:52:04",
"stats": {
"files_changed": 0,
"lines_added": 0,
"lines_deleted": 0
}
},
{
"version": "1.4.7",
"update_type": "patch",
"content": "解决job构建失败的问题",
"author": "Gitea Actions",
"commit_hash": "cab5b606a9728871de830dbf3f8c01361071ef02",
"commit_short_hash": "cab5b606",
"branch": "master",
"release_time": "2025-10-09 17:36:03",
"stats": {
"files_changed": 1,
"lines_added": 23,
"lines_deleted": 13
}
},
{
"version": "1.4.6",
"update_type": "patch",
"content": "解决job构建失败的问题",
"author": "Gitea Actions",
"commit_hash": "2734d375c244fa6b8ef8925cf3d2982751168f4e",
"commit_short_hash": "2734d375",
"branch": "master",
"release_time": "2025-10-09 17:30:35",
"stats": {
"files_changed": 1,
"lines_added": 9,
"lines_deleted": 26
}
},
{
"version": "1.4.5",
"update_type": "patch",
"content": "修改网络问题",
"author": "Gitea Actions",
"commit_hash": "39ba4f93241e2121578518712250582a8345304b",
"commit_short_hash": "39ba4f93",
"branch": "master",
"release_time": "2025-10-09 17:24:42",
"stats": {
"files_changed": 1,
"lines_added": 5,
"lines_deleted": 1
}
},
{
"version": "1.4.4",
"update_type": "patch",
"content": "修改网络问题",
"author": "jjz",
"commit_hash": "41b686fff62d15c197c52e7b47d2ff57826ad00a",
"commit_short_hash": "41b686ff",
"branch": "master",
"release_time": "2025-10-09 17:21:36",
"stats": {
"files_changed": 1,
"lines_added": 11,
"lines_deleted": 11
}
},
{
"version": "1.4.3",
"update_type": "patch",
"content": "修改网络问题",
"author": "jjz",
"commit_hash": "a925ca2c991b9877bfd05753da95b78895a68f31",
"commit_short_hash": "a925ca2c",
"branch": "master",
"release_time": "2025-10-09 17:20:07",
"stats": {
"files_changed": 1,
"lines_added": 19,
"lines_deleted": 11
}
}
]