パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v11.11.1

pub_release

dartfmtの実行、gitタグの作成、パッケージのバージョン番号の増加、pub.devへのパッケージのプッシュを含む、Dartパッケージをpub.devにリリースする自動化を行います。

macOSWindowsLinux
30日間ダウンロード
970
いいね数
22
Pub ポイント
150

パッケージをインストール

flutter pub add pub_release

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

pub_release は、Dart パッケージを pub.dev にリリースするプロセスを自動化する Flutter/Dart パッケージです。コードフォーマットのための dartfmt の実行、バージョン番号の増加、git タグの作成、更新されたパッケージを pub.dev にプッシュすることで、リリースを簡素化します。頻繁にパッケージをリリースする開発者向けに設計されており、手動ステップを減らし、リリースワークフロー中のエラーを最小限に抑えます。macOS、Windows、Linux をサポートしており、主要な開発環境で利用可能です。

用途

  • パッケージリリースの自動化
  • pub.devへの公開を最適化する
  • 一貫したコードフォーマットを保証する
  • バージョンの増加を管理する
  • 手動リリースエラーの削減

主な機能

  • dartfmtの自動実行
  • バージョンのアップグレード
  • Git タグ付け
  • pub.dev にプッシュする
  • クロスプラットフォーム対応

適している対象

  • Dartパッケージメンテナー
  • CI/CDパイプライン統合
  • 頻繁な公開者
  • オープンソース貢献者

注意事項

  • git の設定が必要です
  • pub.devの資格情報が必要です
  • 正しいバージョニング戦略に依存する
  • 複雑なワークフローにはカスタム設定が必要になる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

README

Pub Release is a package that automates publishing dart/flutter packages to pub.dev.

Pub Release also supports the simultaneous release of multiple related packages.

Pub Release performs the following operations:

  • Run pre/post release 'hook' scripts.
  • Formats all code using dartfmt
  • Increments the version no. using semantic versioning after asking what sort of changes have been made.
  • Creates a dart file containing the version no. in src/version/version.g.dart
  • Updates the pubspec.yaml with the new version no.
  • If you are using Git:
    • Generates a Git Tag using the new version no.
    • Generates release notes from commit messages since the last tag.
    • Publish any executables list in pubspec.yaml as assets on github
  • Allows you to edit the release notes.
  • Adds the release notes to CHANGELOG.MD along with the new version no.
  • Publishes the package to pub.dev.

Getting Started

Install Pub Release globally:

dart pub global activate pub_release

Run it from your package root:

pub_release

Read the full documentation to learn how to use it.

Common Workflows

Dry-run a release (no publish):

pub_release --dry-run

Set a specific version and skip prompts:

pub_release --setVersion=1.2.3 --autoAnswer

Run multi-package release in a mono-repo:

pub_release multi

Dry Run

Use --dry-run to validate a release without publishing. During a dry run, pub_release performs the publish step inside a temporary copy of your package to avoid git working tree warnings while still validating the generated version and changelog.

If you need to allow warnings from dart pub publish, pass --ignore-warnings.

Commands

  • pub_release - release a single package (default).
  • pub_release multi - release related packages using tool/pubrelease.multi.yaml.
  • pub_release help - show usage.

Flags

  • --dry-run - validate but do not publish.
  • --ignore-warnings - pass --ignore-warnings to dart pub publish.
  • --[no]-test - enable/disable unit tests (default: on).
  • --test-concurrency=<n> - maximum concurrent test suites (positive integer); overrides the project setting.
  • --line=<n> - formatter line length (default: 80).
  • --[no]-format - enable/disable formatting (default: on).
  • --verbose - enable verbose logging.
  • --git - enable git operations (default: on).
  • --no-multi - disable multi-release even if a multi config exists.
  • --askVersion - prompt for version (default).
  • --setVersion=<x.y.z> - set version directly.
  • --autoAnswer - suppress prompts (requires --setVersion).
  • --tags=<tag,...> - only run tests matching tags.
  • --exclude-tags=<tag,...> - exclude tests by tag.
  • --skip-packages=<name,...> - skip named packages when running the multi command.

Test Concurrency

For projects whose tests share external state, run test suites serially by adding the following to tool/.pubrelease.yaml:

test-concurrency: 1

Override the project setting for a release with:

pub_release --test-concurrency=4

Pub Release passes the selected value to critical_test as --concurrency=<n>. The value must be a positive integer. If neither setting is provided, critical_test's default concurrency is unchanged. For multi-package releases, the selected value applies to every released package. --no-test still skips tests regardless of the concurrency setting.

Multi Release Notes

When using pub_release multi, the first package that generates a changelog entry will have its release notes propagated to the other packages unless they already contain notes for that version.

カテゴリー

依存関係

依存関係一覧 10 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。