Compare commits
10 Commits
a925ca2c99
...
2cb4ac62a2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2cb4ac62a2 | ||
|
|
2ba26b79dd | ||
|
|
43b54a99c7 | ||
|
|
cab5b606a9 | ||
|
|
0c6d0608c5 | ||
|
|
2734d375c2 | ||
|
|
286fa4e697 | ||
|
|
39ba4f9324 | ||
|
|
8f30ab9790 | ||
| 41b686fff6 |
@@ -81,23 +81,13 @@ jobs:
|
|||||||
|
|
||||||
# Retry mechanism: maximum 3 attempts
|
# Retry mechanism: maximum 3 attempts
|
||||||
$SUCCESS = $false
|
$SUCCESS = $false
|
||||||
$VERSION = ""
|
|
||||||
for ($i = 1; $i -le 3; $i++) {
|
for ($i = 1; $i -le 3; $i++) {
|
||||||
Write-Host "Attempt $i to create version record..."
|
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) {
|
if ($LASTEXITCODE -eq 0) {
|
||||||
Write-Host "Version record created successfully"
|
Write-Host "Version record created successfully"
|
||||||
$SUCCESS = $true
|
$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
|
break
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Attempt $i failed"
|
Write-Host "Attempt $i failed"
|
||||||
@@ -115,8 +105,14 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set version for next steps
|
# Verify version was updated
|
||||||
echo "VERSION=$VERSION" >> $env:GITHUB_ENV
|
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:
|
env:
|
||||||
DB_HOST: 8.155.9.53
|
DB_HOST: 8.155.9.53
|
||||||
DB_NAME: ai_web
|
DB_NAME: ai_web
|
||||||
@@ -130,7 +126,16 @@ jobs:
|
|||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Write-Host "Committing version changes..."
|
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.name "Gitea Actions"
|
||||||
git config user.email "actions@gitea.local"
|
git config user.email "actions@gitea.local"
|
||||||
@@ -140,7 +145,7 @@ jobs:
|
|||||||
|
|
||||||
$hasChanges = git diff --staged --quiet
|
$hasChanges = git diff --staged --quiet
|
||||||
if ($LASTEXITCODE -ne 0) {
|
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
|
git push origin master
|
||||||
Write-Host "Version changes committed and pushed"
|
Write-Host "Version changes committed and pushed"
|
||||||
} else {
|
} else {
|
||||||
@@ -152,30 +157,22 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
$summaryFile = $env:GITHUB_STEP_SUMMARY
|
# Read version from config.py
|
||||||
if ($summaryFile) {
|
$VERSION = "Unknown"
|
||||||
"## GUI Version Release Summary" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
|
if (Test-Path "config.py") {
|
||||||
"" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
|
$configContent = Get-Content "config.py" -Raw
|
||||||
|
if ($configContent -match 'APP_VERSION\s*=\s*"([\d.]+)"') {
|
||||||
if ("${{ job.status }}" -eq "success") {
|
$VERSION = $matches[1]
|
||||||
"**Status**: Version release succeeded" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
|
|
||||||
} else {
|
|
||||||
"**Status**: Version release failed" | Out-File -FilePath $summaryFile -Append -Encoding UTF8
|
|
||||||
}
|
}
|
||||||
|
|
||||||
"**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 "=========================================="
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ FUTURE_TIMEOUT = 300 # 5分钟
|
|||||||
# 终端日志配置(简化)
|
# 终端日志配置(简化)
|
||||||
LOG_LEVEL = "INFO"
|
LOG_LEVEL = "INFO"
|
||||||
VERSION = "1.0"
|
VERSION = "1.0"
|
||||||
APP_VERSION = "1.0.1" # 应用版本号(用于版本检查)
|
APP_VERSION = "1.4.8" # 应用版本号(用于版本检查)
|
||||||
# GUI配置
|
# GUI配置
|
||||||
WINDOW_TITLE = "AI回复连接入口-V1.0"
|
WINDOW_TITLE = "AI回复连接入口-V1.0"
|
||||||
|
|
||||||
|
|||||||
92
version_history.json
Normal file
92
version_history.json
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user