build: dist 产物入库,支持 Gitea 免构建直接下载
CI / lint + test + build (push) Canceled after 0s

- .gitignore 移除 dist/ 忽略(仅忽略构建临时文件)
- dist/media_organizer 随仓库提交:Gitea raw 链接可直接下载单文件产物
- README 获取项目恢复 curl 下载引导(raw/branch/main/dist/media_organizer)
- build.sh 注释明确入库策略:CI --check 强制产物与源码同步
This commit is contained in:
Shuery committed 2026-08-14 23:41:55 +08:00
1 parent c1ed1795c2
commit e95ec522f2
4 files changed
+7038 -3

No files matched your search

+4 -2
View File
@@ -24,8 +24,10 @@ mo_config/
# 本地调试用媒体库文件名镜像(空文件,不纳入版本控制) # 本地调试用媒体库文件名镜像(空文件,不纳入版本控制)
debug/ debug/
# 构建产物目录(dist/media_organizer 由 build.sh 生成,不入库) # 构建产物:dist/media_organizer 入库(Gitea 可 raw 下载、CI --check 保证与源码同步);
dist/ # 仅忽略构建过程中的临时文件
dist/*.tmp
dist/*.orig
# 运行时输出:--export-map 生成的源→目标对照表目录(mo_map/ 位于脚本目录,按源目录名覆盖更新) # 运行时输出:--export-map 生成的源→目标对照表目录(mo_map/ 位于脚本目录,按源目录名覆盖更新)
mo_map/ mo_map/
+23 -1
View File
@@ -6,11 +6,32 @@
[![Version](https://img.shields.io/badge/version-9.6-blue.svg)](src/lib/main.sh) [![Version](https://img.shields.io/badge/version-9.6-blue.svg)](src/lib/main.sh)
[![Bash](https://img.shields.io/badge/Bash-4.0%2B-black.svg)](https://www.gnu.org/software/bash/) [![Bash](https://img.shields.io/badge/Bash-4.0%2B-black.svg)](https://www.gnu.org/software/bash/)
[![ShellCheck](https://img.shields.io/badge/ShellCheck-passing-brightgreen.svg)](.github/workflows/ci.yml) [![ShellCheck](https://img.shields.io/badge/ShellCheck-passing-brightgreen.svg)](.github/workflows/ci.yml)
[![Tests](https://img.shields.io/badge/tests-120%20cases-blueviolet.svg)](tests/) [![Tests](https://img.shields.io/badge/tests-120%20passed-blueviolet.svg)](tests/)
[![Style: Google Shell](https://img.shields.io/badge/Style-Google%20Shell-green.svg)](https://google.github.io/styleguide/shellguide.html) [![Style: Google Shell](https://img.shields.io/badge/Style-Google%20Shell-green.svg)](https://google.github.io/styleguide/shellguide.html)
[![Gitea](https://img.shields.io/badge/Gitea-1.27.2-609926.svg)](https://gitea.ppuc.lssa.fun/Shuery/MediaOrganizer)
**作者**:LetsShareAll | **许可**:MIT | **语言**:Bash(零运行时依赖,单文件分发) **作者**:LetsShareAll | **许可**:MIT | **语言**:Bash(零运行时依赖,单文件分发)
## 📦 获取项目
```bash
# 自托管 Gitea(推荐):SSH 或 HTTPS 克隆
git clone [email protected]:Shuery/MediaOrganizer.git
# 或
git clone https://gitea.ppuc.lssa.fun/Shuery/MediaOrganizer.git
# 直接下载分发脚本(单文件即用,无需构建)
curl -O https://gitea.ppuc.lssa.fun/Shuery/MediaOrganizer/raw/branch/main/dist/media_organizer
chmod +x media_organizer
# 或从源码自行构建(约 1 秒,需 Ruby + bashly)
./build.sh
```
> [!NOTE]
>
> **零依赖设计**:`dist/media_organizer` 是自包含单文件产物(bashly 生成),仅需系统自带的 `bash`/`curl`/`jq`/`ffprobe`,无需安装 Ruby 或任何语言运行时。构建工具链(bashly)仅在从源码二次构建时需要。
--- ---
## ✨ 特性一览 ## ✨ 特性一览
@@ -47,6 +68,7 @@ flowchart LR
## 📑 目录 ## 📑 目录
0. [获取项目](#-获取项目)
1. [简介与功能](#1-简介与功能) 1. [简介与功能](#1-简介与功能)
2. [依赖与环境要求](#2-依赖与环境要求) 2. [依赖与环境要求](#2-依赖与环境要求)
3. [快速开始](#3-快速开始) 3. [快速开始](#3-快速开始)
+4
View File
@@ -9,6 +9,10 @@
# 版本单一来源:src/lib/main.sh 的 SCRIPT_VERSION 是唯一权威版本号, # 版本单一来源:src/lib/main.sh 的 SCRIPT_VERSION 是唯一权威版本号,
# 构建时注入 bashly.yml 的 version 字段(产物 --version 与脚本内版本一致)。 # 构建时注入 bashly.yml 的 version 字段(产物 --version 与脚本内版本一致)。
# #
# 产物入库策略:dist/media_organizer 随仓库提交(Gitea 可 raw 直接下载,
# 免构建即用);CI 的 `./build.sh --check` 强制产物与源码同步——源码变更
# 后必须重新构建并提交产物,否则 CI 失败。
#
# 依赖:bashly(gem install bashly;开发期工具,产物运行无需 Ruby) # 依赖:bashly(gem install bashly;开发期工具,产物运行无需 Ruby)
# ============================================================================ # ============================================================================
set -euo pipefail set -euo pipefail
Vendored Executable
+7007
View File
File diff suppressed because it is too large. Load diff