mirror of
https://github.com/RubyMetric/chsrc
synced 2025-10-10 06:03:24 +08:00
@@ -1,4 +1,4 @@
|
||||
# DEB Package CI/CD
|
||||
# DEB Package CI/CD 构建
|
||||
|
||||
本文档说明了 chsrc 项目的 DEB 包自动构建和发布流程。
|
||||
|
||||
@@ -45,7 +45,7 @@ sudo dpkg -i ../chsrc_*.deb
|
||||
sudo apt-get install -f # 修复依赖问题
|
||||
|
||||
# 运行测试
|
||||
./test/deb-test.sh
|
||||
bash ./pkg/DEB/deb-test.sh
|
||||
|
||||
# 卸载
|
||||
sudo apt-get remove chsrc
|
||||
@@ -97,5 +97,5 @@ dpkg-deb --contents chsrc_*.deb
|
||||
|
||||
- `.github/workflows/pkg-deb.yml` - CI 工作流配置
|
||||
- `debian/` - Debian 包配置目录
|
||||
- `test/deb-test.sh` - DEB 包功能测试脚本
|
||||
- `pkg/DEB-INSTALL.md` - 用户安装指南
|
||||
- `pkg/DEB/deb-test.sh` - DEB 包功能测试脚本
|
||||
- `pkg/DEB/INSTALL.md` - 用户安装指南
|
43
pkg/DEB/deb-test.sh
Executable file
43
pkg/DEB/deb-test.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
# Test script for DEB package functionality
|
||||
|
||||
set -e
|
||||
|
||||
echo "Testing chsrc DEB package..."
|
||||
|
||||
# Test 1: Check if chsrc binary exists and is executable
|
||||
if [ ! -f "/usr/bin/chsrc" ]; then
|
||||
echo "ERROR: chsrc binary not found at /usr/bin/chsrc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -x "/usr/bin/chsrc" ]; then
|
||||
echo "ERROR: chsrc binary is not executable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✓ chsrc binary exists and is executable"
|
||||
|
||||
# Test 2: Check if man page exists
|
||||
if [ ! -f "/usr/share/man/man1/chsrc.1" ]; then
|
||||
echo "WARNING: chsrc man page not found at /usr/share/man/man1/chsrc.1"
|
||||
else
|
||||
echo "✓ chsrc man page exists"
|
||||
fi
|
||||
|
||||
# Test 3: Test basic functionality
|
||||
echo "Testing basic chsrc functionality..."
|
||||
if chsrc help >/dev/null 2>&1; then
|
||||
echo "✓ chsrc help command works"
|
||||
else
|
||||
echo "ERROR: chsrc help command failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if chsrc list >/dev/null 2>&1; then
|
||||
echo "✓ chsrc list command works"
|
||||
else
|
||||
echo "WARNING: chsrc list command failed"
|
||||
fi
|
||||
|
||||
echo "All DEB package tests passed!"
|
Reference in New Issue
Block a user