Skip to content

Commit

Permalink
chore: 更新文件
Browse files Browse the repository at this point in the history
  • Loading branch information
sinspired committed Dec 5, 2024
1 parent b39748a commit dd8309a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
pip install -U pyinstaller
- name: Build executables (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
for script in setDNS.py setHosts.py setHosts_Classic.py; do
pyinstaller --onefile "$script"
pyinstaller --clean --onefile "$script"
mv "dist/${script%.py}" "dist/${script%.py}-Linux-x64"
done
zip -j "cnNetTool-Linux-x64.zip" dist/*-Linux-x64
Expand All @@ -57,9 +57,9 @@ jobs:
$icoName = $script -replace '\.py$', '.ico'
if (Test-Path -Path $icoName) {
pyinstaller --onefile $script --uac-admin --icon $icoName
pyinstaller --clean --onefile $script --uac-admin --icon $icoName
} else {
pyinstaller --onefile $script --uac-admin
pyinstaller --clean --onefile $script --uac-admin
}
# pyinstaller --onefile $script --uac-admin
Expand All @@ -73,7 +73,7 @@ jobs:
if: matrix.os == 'macos-latest'
run: |
for script in setDNS.py setHosts.py setHosts_Classic.py; do
pyinstaller --onefile "$script"
pyinstaller --clean --onefile "$script"
mv "dist/${script%.py}" "dist/${script%.py}-macOS-x64"
done
zip -j "cnNetTool-macOS-x64.zip" dist/*-macOS-x64
Expand Down
3 changes: 2 additions & 1 deletion setDNS.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ def find_available_dns(args) -> tuple[dict, dict]:
domain_resolutions[domain][server] = ips

logger.debug(
f"{ip_version.upper()} DNS {server} ({region} - {provider}) 成功率 {success_rate:.2%}, 平均延迟 {avg_response_time:.2f}ms"
f"{ip_version.upper()} DNS {server} ({
region} - {provider}) 成功率 {success_rate:.2%}, 平均延迟 {avg_response_time:.2f}ms"
)
except Exception as exc:
logger.error(f"{server} 测试出错: {str(exc)}")
Expand Down

0 comments on commit dd8309a

Please sign in to comment.