chore: use UTF+8 time to build
This commit is contained in:
@@ -104,8 +104,8 @@ jobs:
|
|||||||
|
|
||||||
# Generate autobuild version using autobuild-latest format
|
# Generate autobuild version using autobuild-latest format
|
||||||
CURRENT_BASE_VERSION=$(echo "$CURRENT_VERSION" | sed -E 's/-(alpha|beta|rc)(\.[0-9]+)?//g' | sed -E 's/\+[a-zA-Z0-9.-]+//g')
|
CURRENT_BASE_VERSION=$(echo "$CURRENT_VERSION" | sed -E 's/-(alpha|beta|rc)(\.[0-9]+)?//g' | sed -E 's/\+[a-zA-Z0-9.-]+//g')
|
||||||
MONTH=$(date +%m)
|
MONTH=$(TZ=Asia/Shanghai date +%m)
|
||||||
DAY=$(date +%d)
|
DAY=$(TZ=Asia/Shanghai date +%d)
|
||||||
AUTOBUILD_VERSION="${CURRENT_BASE_VERSION}+autobuild.${MONTH}${DAY}.${LAST_TAURI_COMMIT}"
|
AUTOBUILD_VERSION="${CURRENT_BASE_VERSION}+autobuild.${MONTH}${DAY}.${LAST_TAURI_COMMIT}"
|
||||||
|
|
||||||
echo "🏷️ Autobuild version: $AUTOBUILD_VERSION"
|
echo "🏷️ Autobuild version: $AUTOBUILD_VERSION"
|
||||||
|
|||||||
4
.github/workflows/clean-old-assets.yml
vendored
4
.github/workflows/clean-old-assets.yml
vendored
@@ -88,8 +88,8 @@ jobs:
|
|||||||
|
|
||||||
# Generate autobuild version for consistency
|
# Generate autobuild version for consistency
|
||||||
CURRENT_BASE_VERSION=$(echo "$CURRENT_VERSION" | sed -E 's/-(alpha|beta|rc)(\.[0-9]+)?//g' | sed -E 's/\+[a-zA-Z0-9.-]+//g')
|
CURRENT_BASE_VERSION=$(echo "$CURRENT_VERSION" | sed -E 's/-(alpha|beta|rc)(\.[0-9]+)?//g' | sed -E 's/\+[a-zA-Z0-9.-]+//g')
|
||||||
MONTH=$(date +%m)
|
MONTH=$(TZ=Asia/Shanghai date +%m)
|
||||||
DAY=$(date +%d)
|
DAY=$(TZ=Asia/Shanghai date +%d)
|
||||||
AUTOBUILD_VERSION="${CURRENT_BASE_VERSION}+autobuild.${MONTH}${DAY}.${LAST_TAURI_COMMIT}"
|
AUTOBUILD_VERSION="${CURRENT_BASE_VERSION}+autobuild.${MONTH}${DAY}.${LAST_TAURI_COMMIT}"
|
||||||
|
|
||||||
echo "🏷️ Current autobuild version: $AUTOBUILD_VERSION"
|
echo "🏷️ Current autobuild version: $AUTOBUILD_VERSION"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
- 修复通过 scheme 导入订阅崩溃
|
- 修复通过 scheme 导入订阅崩溃
|
||||||
- 修复单例检测实效
|
- 修复单例检测实效
|
||||||
- 修复启动阶段可能导致的无法连接内核
|
- 修复启动阶段可能导致的无法连接内核
|
||||||
- 修复导入订阅无法 Author Basic
|
- 修复导入订阅无法 Auth Basic
|
||||||
|
|
||||||
### 👙 界面样式
|
### 👙 界面样式
|
||||||
|
|
||||||
|
|||||||
@@ -68,14 +68,24 @@ function getLatestTauriCommit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成短时间戳(格式:YYMMDD)或带 commit(格式:YYMMDD.cc39b27)
|
* 生成短时间戳(格式:MMDD)或带 commit(格式:MMDD.cc39b27)
|
||||||
|
* 使用 Asia/Shanghai 时区
|
||||||
* @param {boolean} withCommit 是否带 commit
|
* @param {boolean} withCommit 是否带 commit
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
function generateShortTimestamp(withCommit = false) {
|
function generateShortTimestamp(withCommit = false) {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const month = String(now.getMonth() + 1).padStart(2, "0");
|
|
||||||
const day = String(now.getDate()).padStart(2, "0");
|
const formatter = new Intl.DateTimeFormat('en-CA', {
|
||||||
|
timeZone: 'Asia/Shanghai',
|
||||||
|
month: '2-digit',
|
||||||
|
day: '2-digit'
|
||||||
|
});
|
||||||
|
|
||||||
|
const parts = formatter.formatToParts(now);
|
||||||
|
const month = parts.find(part => part.type === 'month').value;
|
||||||
|
const day = parts.find(part => part.type === 'day').value;
|
||||||
|
|
||||||
if (withCommit) {
|
if (withCommit) {
|
||||||
const gitShort = getGitShortCommit();
|
const gitShort = getGitShortCommit();
|
||||||
return `${month}${day}.${gitShort}`;
|
return `${month}${day}.${gitShort}`;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ async function sendTelegramNotification() {
|
|||||||
|
|
||||||
const releaseTitle = isAutobuild ? "滚动更新版发布" : "正式发布";
|
const releaseTitle = isAutobuild ? "滚动更新版发布" : "正式发布";
|
||||||
const encodedVersion = encodeURIComponent(version);
|
const encodedVersion = encodeURIComponent(version);
|
||||||
const content = `<b>🎉 <a href="https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/v${encodedVersion}">Clash Verge Rev v${version}</a> ${releaseTitle}</b>\n\n${formattedContent}`;
|
const content = `<b>🎉 <a href="https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/autobuild">Clash Verge Rev v${version}</a> ${releaseTitle}</b>\n\n${formattedContent}`;
|
||||||
|
|
||||||
// 发送到 Telegram
|
// 发送到 Telegram
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user