@@ -107,17 +107,18 @@ jobs:
107107 # 修复 venv 路径
108108 sed -i "s|${PWD}/${PKG}||g" "${PKG}/opt/${APP_NAME}/venv/bin/"* 2>/dev/null || true
109109
110- # 启动脚本
110+ # 启动脚本 (注意这里用 'EOF' 防止 $@ 被过早解析)
111111 cat > "${PKG}/usr/bin/${APP_NAME}" <<'EOF'
112112 #!/bin/bash
113113 export GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/girepository-1.0
114114 cd /opt/assignsticker
115115 exec /opt/assignsticker/venv/bin/python main.py "$@"
116116 EOF
117- chmod +x "${PKG}/usr/bin/${APP_NAME}"
117+
118+ chmod +x "${PKG}/usr/bin/${APP_NAME}"
118119
119- # Desktop Entry
120- cat > "${PKG}/usr/share/applications/${APP_NAME}.desktop" <<EOF
120+ # Desktop Entry (使用 EOF 允许环境变量解析)
121+ cat > "${PKG}/usr/share/applications/${APP_NAME}.desktop" <<EOF
121122 [Desktop Entry]
122123 Name=AssignSticker
123124 Comment=Homework Kanban Application
@@ -129,34 +130,34 @@ jobs:
129130 StartupWMClass=assignsticker
130131 EOF
131132
132- # 计算大小
133- SIZE=$(du -sk "${PKG}" | cut -f1)
133+ # 计算大小
134+ SIZE=$(du -sk "${PKG}" | cut -f1)
134135
135- # Control
136- cat > "${PKG}/DEBIAN/control" <<EOF
136+ # Control (修复了 Description 下方长描述的空格缩进问题)
137+ cat > "${PKG}/DEBIAN/control" <<EOF
137138 Package: ${APP_NAME}
138139 Version: ${APP_VERSION}
139140 Section: education
140141 Priority: optional
141142 Architecture: amd64
142143 Installed-Size: ${SIZE}
143144 Depends: python3 (>= 3.10),
144- gir1.2-gtk-3.0,
145- gir1.2-webkit2-4.1,
146- gir1.2-ayatanaappindicator3-0.1,
147- libcairo2,
148- libgtk-3-0,
149- libwebkit2gtk-4.1-0
145+ gir1.2-gtk-3.0,
146+ gir1.2-webkit2-4.1,
147+ gir1.2-ayatanaappindicator3-0.1,
148+ libcairo2,
149+ libgtk-3-0,
150+ libwebkit2gtk-4.1-0
150151 Maintainer: SECTL <sectl@example.com>
151152 Homepage: https://github.com/sectl/AssignSticker
152153 Description: Homework Showboard Application
153- AssignSticker is a homework management and display
154- application for classroom use.
154+ AssignSticker is a homework management and display
155+ application for classroom use.
155156 EOF
156157
157- # 打包
158- dpkg-deb --root-owner-group --build "${PKG}"
159- mv "build/deb/${APP_NAME}.deb" "AssignSticker-${APP_VERSION}-amd64.deb"
158+ # 打包
159+ dpkg-deb --root-owner-group --build "${PKG}"
160+ mv "build/deb/${APP_NAME}.deb" "AssignSticker-${APP_VERSION}-amd64.deb"
160161
161162 - name : Upload artifact
162163 uses : actions/upload-artifact@v4
0 commit comments