Skip to content

Commit

Permalink
修复日志时间打印失败以及修复ddnsgo直连下载失败的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xfl12345 committed Apr 29, 2024
1 parent e442dad commit 00e3cfd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# 更新日志

## 2024-04-29 v1.6.2

- 修复日志时间打印失败的问题
- 修复网络地理是国外的用户下载安装 DDNS-GO 压缩包失败的问题

## 2024-04-29 v1.6.1

- 因为 jsdelivr 默认缓存最长可达7天以及 Cloudflare CDN 缓存刷新慢,所以切换回默认的线路(国内使用可能会抽风)
Expand Down
2 changes: 1 addition & 1 deletion module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=ddns_go
name=ddns-go
version=v
versionCode=106001
versionCode=106002
author=酷安@七七琴979 酷安@小莫不小心睡着了 搞机客/搞机助手@情非得已 GitHub@xfl12345
description=简单好用的DDNS,自动获得你的公网 IPv4 或 IPv6 地址,并解析到对应的域名服务。Repo: https://github.com/xfl12345/magisk-ddns-go
updateJson=https://cdn.jsdelivr.net/gh/xfl12345/magisk-ddns-go@latest/version.json
13 changes: 7 additions & 6 deletions script/ddns_go_update_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RESULT_CHECK_CONNECTIVITY=""
# RESULT_EXTRACT_DDNS_GO_ARCHIVE_FILE=""

get_log_date() {
echo "$(date \"+%Y-%m-%d %H:%M:%S\")"
echo "$(date '+%Y-%m-%d %H:%M:%S')"
}

get_github_resource_download_url() {
Expand Down Expand Up @@ -241,8 +241,9 @@ delete_log() {

download_ddns_go_archive_file() {
mkdir -p "${MODDIR}/tmp"
echo "[$(get_log_date)] curl --silent --parallel --output \"${MODDIR}/tmp/${LATEST_DOWNLOAD_URL_FILENAME}\" \"$LATEST_DOWNLOAD_URL\"" >> $EXTRA_LOG_SAVE_PATH/debug.log
curl --silent --parallel --output "${MODDIR}/tmp/${LATEST_DOWNLOAD_URL_FILENAME}" "$LATEST_DOWNLOAD_URL" 2>&1 >> $EXTRA_LOG_SAVE_PATH/debug.log
download_cmd="curl --silent --parallel --output --location \"${MODDIR}/tmp/${LATEST_DOWNLOAD_URL_FILENAME}\" \"$LATEST_DOWNLOAD_URL\""
echo "[$(get_log_date)] $download_cmd" >> $EXTRA_LOG_SAVE_PATH/debug.log
$download_cmd 2>&1 >> $EXTRA_LOG_SAVE_PATH/debug.log
if [ $? -eq 0 ]; then
chmod 755 "${MODDIR}/tmp/${LATEST_DOWNLOAD_URL_FILENAME}"
return 0
Expand All @@ -252,9 +253,9 @@ download_ddns_go_archive_file() {
}

extract_ddns_go_archive_file() {
echo "[$(get_log_date)] tar -xzf \"${MODDIR}/tmp/${LATEST_DOWNLOAD_URL_FILENAME}\" -C \"${MODDIR}/tmp\"" >> $EXTRA_LOG_SAVE_PATH/debug.log
tar -xzf "${MODDIR}/tmp/${LATEST_DOWNLOAD_URL_FILENAME}" -C "${MODDIR}/tmp" 2>&1 >> $EXTRA_LOG_SAVE_PATH/debug.log
# tar -xzf "${MODDIR}/tmp/${LATEST_DOWNLOAD_URL_FILENAME}" -C "${MODDIR}/tmp" 2>&1 > /dev/null
decompression_cmd="tar -xzf \"${MODDIR}/tmp/${LATEST_DOWNLOAD_URL_FILENAME}\" -C \"${MODDIR}/tmp\""
echo "[$(get_log_date)] $decompression_cmd" >> $EXTRA_LOG_SAVE_PATH/debug.log
$decompression_cmd 2>&1 >> $EXTRA_LOG_SAVE_PATH/debug.log
if [ $? -eq 0 ]; then
mv -f "${MODDIR}/tmp/ddns-go" "${MODDIR}/bin/ddns-go"
chmod 755 "${MODDIR}/bin/ddns-go"
Expand Down
8 changes: 4 additions & 4 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"versionCode": 106001,
"version": "v1.6.1",
"zipUrl": "https://gh.con.sh/https://github.com/xfl12345/magisk-ddns-go/releases/download/v1.6.1/magisk-ddns-go.zip",
"changelog": "https://cdn.jsdelivr.net/gh/xfl12345/magisk-ddns-go@v1.6.1/changelog.md"
"versionCode": 106002,
"version": "v1.6.2",
"zipUrl": "https://gh.con.sh/https://github.com/xfl12345/magisk-ddns-go/releases/download/v1.6.2/magisk-ddns-go.zip",
"changelog": "https://cdn.jsdelivr.net/gh/xfl12345/magisk-ddns-go@v1.6.2/changelog.md"
}

0 comments on commit 00e3cfd

Please sign in to comment.