搜尋套件、儲存庫與 APP 分類

套件詳情v0.2.10

cider

自動遞增、設定和列印 pubspec.yaml 中的套件版本。新增、列出和列印變更紀錄中的項目。在變更紀錄中建立差異連結。

AndroidiOSmacOSWindowsLinux
近 30 天下載
3.9萬
喜歡數
175
Pub 分數
150

安裝套件

flutter pub add cider

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Cider 是一個 Flutter/Dart 套件,可自動管理 pubspec.yaml 中的版本號,包含遞增與列印版本號。它透過允許使用者新增、列出及列印變更日誌項目,同時自動產生版本之間的差異連結,簡化變更日誌的處理。專為無縫整合至開發工作流程而設計,可簡化 Android、iOS、macOS、Windows 與 Linux 平台上的發行流程。適合希望無需手動操作即可維持一致版本控制與詳細變更日誌的團隊。

適用情境

  • 在發布前自動升級版本
  • 維護結構化的變更日誌
  • 在發行說明中產生 git diff 鏈結
  • 優化CI/CD流程
  • 確保跨平台的版本一致性

主要特色

  • 自動遞增套件版本
  • 產生帶有差異連結的變更日誌項目
  • 列印目前版本與變更記錄
  • 支援多個平台
  • 與 pubspec.yaml 集成

適合對象

  • 使用 Flutter 的開發團隊
  • 頻繁發佈專案
  • CI/CD 環境
  • 重視發布文件的團隊
  • 開源套件的維護者

使用建議

  • 需要設定 git 才能使用差異連結
  • 需要手動干預以處理自定義版本格式
  • 可能與其他版本工具衝突
  • 最適合在受控釋放工作流程中使用
  • 取決於 pubspec.yaml 的結構

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

logo

Cider (CI for Dart: Efficient Release)

Cider is a CLI tool for Dart package maintenance. It updates CHANGELOG.md and pubspec.yaml to help automate releases.

Assumptions

Cider expects:

  • a CHANGELOG.md file in the project root
  • changelog format compatible with Keep a Changelog
  • simple Markdown in changelog entries (no HTML or complex formatting)
  • project versions that follow Semantic Versioning 2.0.0

Installation

dart pub global activate cider

Configuration

Configure Cider in pubspec.yaml under cider:

cider:
  link_template:
    tag: https://github.com/example/project/releases/tag/%tag%
    diff: https://github.com/example/project/compare/%from%...%to%
    version: v%version% # default: %version%

Placeholders:

  • %from% - previous version tag
  • %to% - current version tag
  • %tag% - release tag

Project root detection

You can run Cider from any subdirectory. It searches upward for pubspec.yaml.

To override auto-detection:

cider --project-root=/path/to/project version

Changelog commands

These commands modify CHANGELOG.md unless stated otherwise.

Add an entry
cider log <type> <description>
  • <type>: added, changed, deprecated, removed, fixed, security
  • <description>: one Markdown line

Examples:

cider log changed 'Improve parser performance'
cider log added 'Support workspace mode'
cider log fixed 'Null pointer in changelog parser'
Release Unreleased entries
cider release [options]

Options:

  • --date - release date (default: today)

If link_template.diff is configured, Cider generates changelog diff links automatically.

Print changes for a version (read-only)
cider describe [<version>] [options]
  • <version> defaults to Unreleased if omitted

Options:

  • --only-body - omit section header and link footer
List versions
cider list [options]

Options:

  • --include-yanked, -y
  • --include-unreleased, -u

Version commands

These commands operate on version in pubspec.yaml.

Print current version (read-only)
cider version
Set version
cider version <new_version>

<new_version> must be SemVer-compatible.

Examples:

Before Command After
1.2.3+1 cider version 3.2.1 3.2.1
0.2.1-dev cider version 0.0.1-alpha+42 0.0.1-alpha+42
Yank / unyank a release in changelog
cider yank <version>
cider unyank <version>

Yanked versions are marked as [YANKED] in CHANGELOG.md.

Bump version
cider bump <part> [options]

<part> can be:

  • breaking (y for 0.y.z, otherwise x for x.y.z)
  • major
  • minor
  • patch
  • build
  • pre (pre-release)
  • release (remove pre-release suffix)

Options:

  • --keep-build - keep existing build metadata
  • --bump-build - increment build metadata
  • --build=<value> - set build metadata explicitly
  • --pre=<prefix> - set pre-release prefix

Notes:

  • For pre and build, Cider increments the rightmost dot-separated numeric identifier.
  • If no numeric identifier exists, Cider appends .1.
  • Per SemVer, build metadata does not affect version precedence.

Examples:

Before Command After
1.2.1-alpha+42 cider bump breaking 2.0.0
0.2.1-alpha+42 cider bump breaking 0.3.0
0.2.1-alpha+42 cider bump major 1.0.0
0.2.1-alpha+42 cider bump minor 0.3.0
0.2.1-alpha+42 cider bump patch 0.2.1
0.2.1 cider bump patch 0.2.2
0.2.1-alpha+42 cider bump pre 0.2.1-alpha.1
1.2.1-alpha+42 cider bump breaking --keep-build 2.0.0+42
0.2.1-alpha+42 cider bump breaking --bump-build 0.3.0+43
0.2.1-alpha+42 cider bump major --build=2020-02-02 1.0.0+2020-02-02
0.2.1-alpha+42 cider bump minor --pre=alpha --bump-build 0.3.0-alpha+43
0.2.1-alpha+42 cider bump release 0.2.1
0.2.1-alpha+42 cider bump release --keep-build 0.2.1+42

Exit codes

Code Meaning
0 Success
64 Usage error (invalid arguments)
65 Data error (missing/invalid project files)
70 Internal software error (consider opening an issue)

所屬分類

依賴

依賴清單 9 項

原始碼儲存庫

使用此套件的專案