패키지, 저장소 및 앱 카테고리 검색

패키지 상세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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.