mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-28 01:13:15 +08:00
release 100.1.1
This commit is contained in:
@@ -195,18 +195,20 @@ function main() {
|
|||||||
|
|
||||||
fs.writeFileSync(outputPath, tsContent, 'utf-8');
|
fs.writeFileSync(outputPath, tsContent, 'utf-8');
|
||||||
|
|
||||||
|
// 读取 VERSION.txt 并同步到 version.ts
|
||||||
|
const versionTxtPath = path.join(process.cwd(), 'VERSION.txt');
|
||||||
|
const versionFromFile = fs.readFileSync(versionTxtPath, 'utf8').trim();
|
||||||
|
console.log(`📄 VERSION.txt 版本: ${versionFromFile}`);
|
||||||
|
updateVersionTs(versionFromFile);
|
||||||
|
|
||||||
// 检查是否在 GitHub Actions 环境中运行
|
// 检查是否在 GitHub Actions 环境中运行
|
||||||
const isGitHubActions = process.env.GITHUB_ACTIONS === 'true';
|
const isGitHubActions = process.env.GITHUB_ACTIONS === 'true';
|
||||||
|
|
||||||
if (isGitHubActions) {
|
if (isGitHubActions) {
|
||||||
// 在 GitHub Actions 中,更新版本文件
|
// 在 GitHub Actions 中,更新 VERSION.txt 为 CHANGELOG 最新版本
|
||||||
console.log('正在更新版本文件...');
|
console.log('正在更新 VERSION.txt...');
|
||||||
updateVersionFile(latestVersion);
|
updateVersionFile(latestVersion);
|
||||||
updateVersionTs(latestVersion);
|
updateVersionTs(latestVersion);
|
||||||
} else {
|
|
||||||
// 在本地运行时,只提示但不更新版本文件
|
|
||||||
console.log('🔧 本地运行模式:跳过版本文件更新');
|
|
||||||
console.log('💡 版本文件更新将在 git tag 触发的 release 工作流中完成');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`✅ 成功生成 ${outputPath}`);
|
console.log(`✅ 成功生成 ${outputPath}`);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
const CURRENT_VERSION = '100.1.0';
|
const CURRENT_VERSION = '100.1.1';
|
||||||
|
|
||||||
// 导出当前版本号供其他地方使用
|
// 导出当前版本号供其他地方使用
|
||||||
export { CURRENT_VERSION };
|
export { CURRENT_VERSION };
|
||||||
|
|||||||
Reference in New Issue
Block a user