🔧 chore(license): 补齐开源许可与发布声明

- 新增项目版权及上游 NOTICE
- 让桌面、容器、驱动发布包携带法律文档
- 补充 Wails 和前端许可证元数据
- 增加发布资产回归校验
This commit is contained in:
Syngnat
2026-07-16 17:24:16 +08:00
parent d14ac65db9
commit 193d68398b
17 changed files with 357 additions and 8 deletions

View File

@@ -31,6 +31,8 @@ jobs:
bash tools/generate-driver-agent-revisions.test.sh
python3 tools/generate-driver-release-manifest.test.py
python3 tools/generate-update-latest-manifest.test.py
python3 tools/package-driver-release-assets.test.py
python3 tools/legal-release-assets.test.py
python3 tools/windows-release-artifacts.test.py
- name: Setup Node
@@ -844,6 +846,9 @@ jobs:
exit 1
fi
APP_NAME=$(basename "$APP_PATH")
mkdir -p "$APP_NAME/Contents/Resources"
cp ../../LICENSE "$APP_NAME/Contents/Resources/LICENSE"
cp ../../NOTICE "$APP_NAME/Contents/Resources/NOTICE"
APP_BIN=$(find "$APP_PATH/Contents/MacOS" -maxdepth 1 -type f | head -n 1)
if [ -z "$APP_BIN" ]; then
@@ -954,7 +959,9 @@ jobs:
"0BCEE70B-9CF2-449C-9ADE-190188493234"
}
$licenseText = Get-Content -LiteralPath "..\\..\\LICENSE" -Raw
$licenseFile = (Resolve-Path -LiteralPath "..\\..\\LICENSE").Path
$noticeFile = (Resolve-Path -LiteralPath "..\\..\\NOTICE").Path
$licenseText = Get-Content -LiteralPath $licenseFile -Raw
$escapedLicense = $licenseText.Replace('\', '\\').Replace('{', '\{').Replace('}', '\}')
$escapedLicense = $escapedLicense -replace "`r?`n", "\par`r`n"
$licenseRtf = Join-Path $env:RUNNER_TEMP "GoNavi-License.rtf"
@@ -982,6 +989,8 @@ jobs:
-d "InstallMarker=$installMarkerPath" `
-d "IconPath=$iconPath" `
-d "LicenseRtf=$licenseRtf" `
-d "LicenseFile=$licenseFile" `
-d "NoticeFile=$noticeFile" `
-pdbtype none `
-intermediatefolder $wixIntermediateDir `
-out "..\\..\\$msiName"
@@ -1018,7 +1027,7 @@ jobs:
fi
echo "📦 正在打包 $TAR_NAME..."
tar -czvf "$TAR_NAME" "$TARGET"
tar -czvf "$TAR_NAME" "$TARGET" -C ../.. LICENSE NOTICE
mv "$TAR_NAME" ../../
if [ -f /tmp/skip-appimage ]; then
@@ -1029,9 +1038,12 @@ jobs:
echo "📦 正在生成 AppImage..."
mkdir -p AppDir/usr/bin
mkdir -p AppDir/usr/share/applications
mkdir -p AppDir/usr/share/doc/gonavi
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
cp "$TARGET" AppDir/usr/bin/gonavi
cp ../../LICENSE AppDir/usr/share/doc/gonavi/LICENSE
cp ../../NOTICE AppDir/usr/share/doc/gonavi/NOTICE
printf '%s\n' \
'[Desktop Entry]' \
@@ -1102,6 +1114,10 @@ jobs:
pattern: dev-build-artifacts-*
merge-multiple: true
- name: Add legal documents
shell: bash
run: install -m 0644 LICENSE NOTICE release-assets/
- name: List Assets
run: ls -R release-assets

View File

@@ -85,6 +85,7 @@ jobs:
labels: |
org.opencontainers.image.title=${{ matrix.image_name }}
org.opencontainers.image.description=${{ matrix.description }}
org.opencontainers.image.licenses=Apache-2.0
- name: Build smoke image
uses: docker/build-push-action@v6
@@ -234,6 +235,7 @@ jobs:
labels: |
org.opencontainers.image.title=${{ matrix.image_name }}
org.opencontainers.image.description=${{ matrix.description }}
org.opencontainers.image.licenses=Apache-2.0
- name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests

View File

@@ -27,6 +27,8 @@ jobs:
bash tools/generate-driver-agent-revisions.test.sh
python3 tools/generate-driver-release-manifest.test.py
python3 tools/generate-update-latest-manifest.test.py
python3 tools/package-driver-release-assets.test.py
python3 tools/legal-release-assets.test.py
python3 tools/windows-release-artifacts.test.py
- name: Setup Node
@@ -787,6 +789,9 @@ jobs:
exit 1
fi
APP_NAME=$(basename "$APP_PATH")
mkdir -p "$APP_NAME/Contents/Resources"
cp ../../LICENSE "$APP_NAME/Contents/Resources/LICENSE"
cp ../../NOTICE "$APP_NAME/Contents/Resources/NOTICE"
APP_BIN=$(find "$APP_PATH/Contents/MacOS" -maxdepth 1 -type f | head -n 1)
if [ -z "$APP_BIN" ]; then
@@ -908,7 +913,9 @@ jobs:
"0BCEE70B-9CF2-449C-9ADE-190188493234"
}
$licenseText = Get-Content -LiteralPath "..\\..\\LICENSE" -Raw
$licenseFile = (Resolve-Path -LiteralPath "..\\..\\LICENSE").Path
$noticeFile = (Resolve-Path -LiteralPath "..\\..\\NOTICE").Path
$licenseText = Get-Content -LiteralPath $licenseFile -Raw
$escapedLicense = $licenseText.Replace('\', '\\').Replace('{', '\{').Replace('}', '\}')
$escapedLicense = $escapedLicense -replace "`r?`n", "\par`r`n"
$licenseRtf = Join-Path $env:RUNNER_TEMP "GoNavi-License.rtf"
@@ -936,6 +943,8 @@ jobs:
-d "InstallMarker=$installMarkerPath" `
-d "IconPath=$iconPath" `
-d "LicenseRtf=$licenseRtf" `
-d "LicenseFile=$licenseFile" `
-d "NoticeFile=$noticeFile" `
-pdbtype none `
-intermediatefolder $wixIntermediateDir `
-out "..\\..\\$msiName"
@@ -974,7 +983,7 @@ jobs:
# 1. Create tar.gz
echo "📦 正在打包 $TAR_NAME..."
tar -czvf "$TAR_NAME" "$TARGET"
tar -czvf "$TAR_NAME" "$TARGET" -C ../.. LICENSE NOTICE
mv "$TAR_NAME" ../../
# 2. Create AppImage (skip for ARM64 or if tools unavailable)
@@ -988,9 +997,12 @@ jobs:
# Create AppDir structure
mkdir -p AppDir/usr/bin
mkdir -p AppDir/usr/share/applications
mkdir -p AppDir/usr/share/doc/gonavi
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
cp "$TARGET" AppDir/usr/bin/gonavi
cp ../../LICENSE AppDir/usr/share/doc/gonavi/LICENSE
cp ../../NOTICE AppDir/usr/share/doc/gonavi/NOTICE
# Create desktop file
printf '%s\n' \
@@ -1067,6 +1079,10 @@ jobs:
pattern: build-artifacts-*
merge-multiple: true
- name: Add legal documents
shell: bash
run: install -m 0644 LICENSE NOTICE release-assets/
- name: List Assets
run: ls -R release-assets

View File

@@ -50,6 +50,9 @@ RUN apt-get update \
&& go install github.com/wailsapp/wails/v2/cmd/wails@${WAILS_VERSION} \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/share/doc/gonavi
COPY LICENSE NOTICE /usr/share/doc/gonavi/
WORKDIR /workspace
CMD ["bash"]

View File

@@ -26,10 +26,12 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --system --create-home --home-dir /var/lib/gonavi --uid 10001 gonavi \
&& mkdir -p /data /var/lib/gonavi/logs \
&& mkdir -p /data /var/lib/gonavi/logs /usr/share/doc/gonavi \
&& chown -R gonavi:gonavi /data /var/lib/gonavi
COPY --from=builder /out/gonavi-mcp-server /usr/local/bin/gonavi-mcp-server
COPY --from=builder /src/LICENSE /usr/share/doc/gonavi/LICENSE
COPY --from=builder /src/NOTICE /usr/share/doc/gonavi/NOTICE
ENV HOME=/var/lib/gonavi \
GONAVI_DATA_ROOT=/data \

View File

@@ -42,10 +42,12 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates tzdata curl \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --system --create-home --home-dir /var/lib/gonavi --uid 10001 gonavi \
&& mkdir -p /data /var/lib/gonavi/logs \
&& mkdir -p /data /var/lib/gonavi/logs /usr/share/doc/gonavi \
&& chown -R gonavi:gonavi /data /var/lib/gonavi
COPY --from=builder /out/gonavi /usr/local/bin/gonavi
COPY --from=builder /src/LICENSE /usr/share/doc/gonavi/LICENSE
COPY --from=builder /src/NOTICE /usr/share/doc/gonavi/NOTICE
ENV HOME=/var/lib/gonavi \
GONAVI_DATA_ROOT=/data \

181
NOTICE Normal file
View File

@@ -0,0 +1,181 @@
GoNavi
Copyright 2026 Syngnat
This product includes software developed by the following projects.
Apache RocketMQ
Copyright 2016-2022 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Apache IoTDB
Copyright 2018-2020 The Apache Software Foundation.
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
============================================================================
IoTDB project uses 4 Chinese Patents:
* 201711384490X
* 201810111712.9
* 201711322631.5
* 201711319331.1
According to the Apache 2.0 License. The owner of the patents, Tsinghua University,
grant the users the right to the use of patent under the requirement of Apache 2.0 License.
============================================================================
Apache Thrift
Copyright (C) 2006 - 2019, The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
go-yaml
Copyright 2011-2016 Canonical Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Eclipse Paho MQTT Go
This content is produced and maintained by the Eclipse Paho project.
* Project home: https://www.eclipse.org/paho/
Note that a separate mqtt v5 client (https://github.com/eclipse/paho.golang) also
exists. It is a full rewrite and deliberately incompatible with this library.
Eclipse Mosquitto trademarks of the Eclipse Foundation. Eclipse, and the
Eclipse Logo are registered trademarks of the Eclipse Foundation.
Paho is a trademark of the Eclipse Foundation. Eclipse, and the Eclipse Logo are
registered trademarks of the Eclipse Foundation.
All content is the property of the respective authors or their employers.
For more information regarding authorship of content, please consult the
listed source code repository logs.
This program and the accompanying materials are made available under the terms of the
Eclipse Public License v2.0 and Eclipse Distribution License v1.0 which accompany this
distribution.
The Eclipse Public License is available at
https://www.eclipse.org/legal/epl-2.0/
and the Eclipse Distribution License is available at
http://www.eclipse.org/org/documents/edl-v10.php.
For an explanation of what dual-licensing means to you, see:
https://www.eclipse.org/legal/eplfaq.php#DUALLIC
SPDX-License-Identifier: EPL-2.0 or BSD-3-Clause
The project maintains the following source code repository:
* https://github.com/eclipse/paho.mqtt.golang
This project makes use of the following third-party projects:
Go Programming Language and Standard Library
* License: BSD-style license (https://golang.org/LICENSE)
Go Networking
* License: BSD 3-Clause style license and patent grant.
* Project: https://cs.opensource.google/go/x/net
Go Sync
* License: BSD 3-Clause style license and patent grant.
* Project: https://cs.opensource.google/go/x/sync/
Gorilla Websockets v1.4.2
* License: BSD 2-Clause "Simplified" License
* Project: https://github.com/gorilla/websocket
Content may contain encryption software. The country in which you are currently
may have restrictions on the import, possession, and use, and/or re-export to
another country. BEFORE using any encryption software, please check the country's
laws, regulations and policies concerning the import, possession, and use, and/or
re-export of encryption software, to see if this is permitted.
Vendored HighGo pq-sm3 (derived from lib/pq)
Copyright (c) 2011-2013, 'pq' Contributors
Portions Copyright (C) 2011 Blake Mizerany
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The vendored SCRAM implementation includes the following BSD 3-Clause notice:
Copyright (c) 2014 - Gustavo Niemeyer <gustavo@niemeyer.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Vendored InterSystems IRIS native driver
Copyright (c) 2025 Dmitry Maslennikov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -47,6 +47,12 @@
<File Id="GoNaviMsiInstallMarker"
Source="$(var.InstallMarker)"
Name=".gonavi-msi-install" />
<File Id="GoNaviLicense"
Source="$(var.LicenseFile)"
Name="LICENSE.txt" />
<File Id="GoNaviNotice"
Source="$(var.NoticeFile)"
Name="NOTICE.txt" />
<RegistryValue Root="HKLM"
Key="Software\Syngnat\$(var.RegistryKeyName)"
Name="InstallType"

View File

@@ -7,6 +7,7 @@
"": {
"name": "gonavi-client",
"version": "0.6.5",
"license": "Apache-2.0",
"dependencies": {
"@ant-design/icons": "^5.2.6",
"@dnd-kit/core": "^6.3.1",

View File

@@ -2,6 +2,7 @@
"name": "gonavi-client",
"private": true,
"version": "0.6.5",
"license": "Apache-2.0",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -34,6 +34,8 @@ REPO = "Syngnat/GoNavi"
SCHEMA_VERSION = 1
SKIP_NAMES = {
"SHA256SUMS",
"LICENSE",
"NOTICE",
"latest.json",
"latest-dev.json",
".DS_Store",

View File

@@ -18,6 +18,8 @@ class GenerateUpdateLatestManifestTest(unittest.TestCase):
msi = assets / "GoNavi-1.2.3-Windows-Amd64-Installer.msi"
exe.write_bytes(b"fake-binary")
msi.write_bytes(b"fake-installer")
(assets / "LICENSE").write_text("license text\n", encoding="utf-8")
(assets / "NOTICE").write_text("notice text\n", encoding="utf-8")
(assets / "SHA256SUMS").write_text(
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GoNavi-1.2.3-Windows-Amd64-Portable.exe\n"
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb GoNavi-1.2.3-Windows-Amd64-Installer.msi\n",
@@ -67,6 +69,8 @@ class GenerateUpdateLatestManifestTest(unittest.TestCase):
)
self.assertEqual(installer_asset["sha256"], "b" * 64)
self.assertNotIn("SHA256SUMS", [a["name"] for a in data["assets"]])
self.assertNotIn("LICENSE", [a["name"] for a in data["assets"]])
self.assertNotIn("NOTICE", [a["name"] for a in data["assets"]])
if __name__ == "__main__":

View File

@@ -0,0 +1,69 @@
#!/usr/bin/env python3
import json
import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
WORKFLOWS = (
ROOT / ".github" / "workflows" / "release.yml",
ROOT / ".github" / "workflows" / "dev-build.yml",
)
DOCKERFILES = (
ROOT / "Dockerfile.mcp-server",
ROOT / "Dockerfile.web-server",
ROOT / "Dockerfile.build-env",
)
class LegalReleaseAssetsTest(unittest.TestCase):
def test_notice_identifies_project_and_upstream_notices(self) -> None:
notice = (ROOT / "NOTICE").read_text(encoding="utf-8")
self.assertTrue(notice.startswith("GoNavi\nCopyright 2026 Syngnat\n"))
for component in (
"Apache RocketMQ",
"Apache IoTDB",
"Apache Thrift",
"Eclipse Paho MQTT Go",
"Vendored HighGo pq-sm3",
"Vendored InterSystems IRIS native driver",
):
with self.subTest(component=component):
self.assertIn(component, notice)
def test_project_metadata_declares_the_license_and_copyright(self) -> None:
wails = json.loads((ROOT / "wails.json").read_text(encoding="utf-8"))
frontend = json.loads((ROOT / "frontend" / "package.json").read_text(encoding="utf-8"))
self.assertEqual(wails["author"], {"name": "Syngnat", "email": "yangguofeng919@gmail.com"})
self.assertEqual(wails["info"]["copyright"], "Copyright 2026 Syngnat")
self.assertEqual(frontend["license"], "Apache-2.0")
def test_release_workflows_bundle_legal_documents(self) -> None:
for workflow in WORKFLOWS:
with self.subTest(workflow=workflow.name):
source = workflow.read_text(encoding="utf-8")
self.assertIn('cp ../../LICENSE "$APP_NAME/Contents/Resources/LICENSE"', source)
self.assertIn('cp ../../NOTICE "$APP_NAME/Contents/Resources/NOTICE"', source)
self.assertIn('tar -czvf "$TAR_NAME" "$TARGET" -C ../.. LICENSE NOTICE', source)
self.assertIn("AppDir/usr/share/doc/gonavi", source)
self.assertIn("cp ../../LICENSE AppDir/usr/share/doc/gonavi/LICENSE", source)
self.assertIn("cp ../../NOTICE AppDir/usr/share/doc/gonavi/NOTICE", source)
self.assertIn('run: install -m 0644 LICENSE NOTICE release-assets/', source)
self.assertIn('-d "LicenseFile=$licenseFile"', source)
self.assertIn('-d "NoticeFile=$noticeFile"', source)
def test_docker_images_include_legal_documents(self) -> None:
for dockerfile in DOCKERFILES:
with self.subTest(dockerfile=dockerfile.name):
source = dockerfile.read_text(encoding="utf-8")
self.assertIn("/usr/share/doc/gonavi", source)
self.assertIn("LICENSE", source)
self.assertIn("NOTICE", source)
if __name__ == "__main__":
unittest.main()

View File

@@ -7,6 +7,10 @@ import zipfile
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
LEGAL_FILENAMES = ("LICENSE", "NOTICE")
def main():
if len(sys.argv) != 3:
raise SystemExit("usage: package-driver-release-assets.py <drivers-dir> <output-dir>")
@@ -17,6 +21,12 @@ def main():
if not drivers_dir.is_dir():
raise SystemExit(f"drivers dir not found: {drivers_dir}")
legal_files = [ROOT / filename for filename in LEGAL_FILENAMES]
missing_legal_files = [path for path in legal_files if not path.is_file()]
if missing_legal_files:
missing = ", ".join(str(path) for path in missing_legal_files)
raise SystemExit(f"legal notice files not found: {missing}")
out_name = "GoNavi-DriverAgents.zip"
index_name = "GoNavi-DriverAgents-Index.json"
manifest_name = "GoNavi-DriverAgents-Manifest.json"
@@ -46,6 +56,13 @@ def main():
shutil.copy2(asset, standalone_path)
standalone_assets.append(standalone_path.name)
for legal_file in legal_files:
zf.write(legal_file, legal_file.name)
standalone_path = output_dir / legal_file.name
if standalone_path.exists():
raise RuntimeError(f"release asset already exists: {standalone_path}")
shutil.copy2(legal_file, standalone_path)
index_path.write_text(
json.dumps({"assets": size_index}, ensure_ascii=False, indent=2) + "\n",
encoding="utf-8",
@@ -54,6 +71,7 @@ def main():
print(f"created {out_name} size={out_path.stat().st_size} bytes")
print(f"created {index_name} entries={len(size_index)}")
print(f"published standalone driver assets={len(standalone_assets)}")
print(f"bundled legal files={len(legal_files)}")
print(f"reserved manifest output path: {manifest_path}")
return 0

View File

@@ -39,6 +39,8 @@ class PackageDriverReleaseAssetsTest(unittest.TestCase):
self.assertTrue((output_dir / "GoNavi-DriverAgents.zip").is_file())
self.assertTrue((output_dir / windows_asset.name).is_file())
self.assertTrue((output_dir / darwin_asset.name).is_file())
self.assertEqual((output_dir / "LICENSE").read_bytes(), (ROOT / "LICENSE").read_bytes())
self.assertEqual((output_dir / "NOTICE").read_bytes(), (ROOT / "NOTICE").read_bytes())
index = json.loads((output_dir / "GoNavi-DriverAgents-Index.json").read_text(encoding="utf-8"))
self.assertEqual(index["assets"][windows_asset.name], len(b"windows-asset"))
@@ -48,10 +50,14 @@ class PackageDriverReleaseAssetsTest(unittest.TestCase):
self.assertEqual(
sorted(zf.namelist()),
[
"LICENSE",
"MacOS/clickhouse-driver-agent-darwin-arm64",
"NOTICE",
"Windows/clickhouse-driver-agent-windows-amd64.exe",
],
)
self.assertEqual(zf.read("LICENSE"), (ROOT / "LICENSE").read_bytes())
self.assertEqual(zf.read("NOTICE"), (ROOT / "NOTICE").read_bytes())
if __name__ == "__main__":

View File

@@ -40,6 +40,10 @@ class WindowsReleaseArtifactsTest(unittest.TestCase):
self.assertIn(f'"{ARM64_COMPONENT_GUID}"', source)
self.assertIn('$installMarkerPath = Join-Path $env:RUNNER_TEMP ".gonavi-msi-install"', source)
self.assertIn('-d "InstallMarker=$installMarkerPath"', source)
self.assertIn('$licenseFile = (Resolve-Path -LiteralPath "..\\\\..\\\\LICENSE").Path', source)
self.assertIn('$noticeFile = (Resolve-Path -LiteralPath "..\\\\..\\\\NOTICE").Path', source)
self.assertIn('-d "LicenseFile=$licenseFile"', source)
self.assertIn('-d "NoticeFile=$noticeFile"', source)
self.assertNotIn('-d "ProductName=GoNavi Dev"', source)
self.assertNotIn('-d "InstallFolderName=GoNavi Dev"', source)
self.assertNotIn('-d "RegistryKeyName=GoNavi Dev"', source)
@@ -87,6 +91,16 @@ class WindowsReleaseArtifactsTest(unittest.TestCase):
assert file_marker is not None
self.assertEqual(file_marker.attrib["Source"], "$(var.InstallMarker)")
self.assertEqual(file_marker.attrib["Name"], ".gonavi-msi-install")
license_file = package.find(".//wix:File[@Id='GoNaviLicense']", ns)
self.assertIsNotNone(license_file)
assert license_file is not None
self.assertEqual(license_file.attrib["Source"], "$(var.LicenseFile)")
self.assertEqual(license_file.attrib["Name"], "LICENSE.txt")
notice_file = package.find(".//wix:File[@Id='GoNaviNotice']", ns)
self.assertIsNotNone(notice_file)
assert notice_file is not None
self.assertEqual(notice_file.attrib["Source"], "$(var.NoticeFile)")
self.assertEqual(notice_file.attrib["Name"], "NOTICE.txt")
if __name__ == "__main__":

View File

@@ -8,8 +8,14 @@
"wailsjsdir": "./frontend",
"version": "2",
"author": {
"name": "User",
"email": "user@example.com"
"name": "Syngnat",
"email": "yangguofeng919@gmail.com"
},
"info": {
"companyName": "Syngnat",
"productName": "GoNavi",
"copyright": "Copyright 2026 Syngnat",
"comments": "GoNavi is licensed under the Apache License, Version 2.0."
},
"debounceMS": 100,
"appargs": ""