Pub Release is a package to assist in publishing dart/flutter packages to pub.dev.

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

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 with:
dart pub global activate pub_release
Comments
  • Add getting started to readme and link to docs

    Add getting started to readme and link to docs

    It looks like you have added lots of nice documentation on how to use this package. Let's link to it from the readme so people can get to the docs and figure out learn how to use it, right from https://pub.dev/packages/pub_release

    opened by robrbecker 1
  • Exception

    Exception "Null check operator used on a null value" when running in Flutter package

    ANDROID_HOME: /usr/lib/android-sdk pub_release -v output:

    _pathToScript: /usr/lib/dart/bin/dart
    dart 7.1.11
    exists: true /home/tsutton/Projects/dimension_ratios/pubspec.yaml followLinks: true
    read: /home/tsutton/Projects/dimension_ratios/pubspec.yaml, delim: 
    
    exists: true /home/tsutton/Projects/dimension_ratios/pubspec.yaml followLinks: true
    
    Found dimension_ratios version 0.0.1
    
    ask:  Is this the correct package? (y/n): toLower: true hidden: false required: false defaultValue: null
    Is this the correct package? (y/n): y
    ask: pre validation "y"
    ask: post validation "y"
    ask: result y
    
    exists: true /home/tsutton/Projects/dimension_ratios/pubspec.yaml followLinks: true
    exists: true /home/tsutton/Projects/dimension_ratios/pubspec.lock followLinks: true
    exists: true /home/tsutton/Projects/dimension_ratios/.dart_tool/package_config.json followLinks: true
    env:  PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/dart/bin:/home/tsutton/.pub-cache/bin:/home/tsutton/flutter/bin:/usr/lib/dart/bin:/usr/lib/android-sdk/cmdline-tools/latest/bin:/home/tsutton/.pub-cache/bin:/home/tsutton/flutter/bin:/usr/lib/dart/bin:/usr/lib/android-sdk/cmdline-tools/latest/bin
    exists: false /usr/local/sbin/critical_test followLinks: true
    exists: false /usr/local/bin/critical_test followLinks: true
    exists: false /usr/sbin/critical_test followLinks: true
    exists: false /usr/bin/critical_test followLinks: true
    exists: false /sbin/critical_test followLinks: true
    exists: false /bin/critical_test followLinks: true
    exists: false /usr/games/critical_test followLinks: true
    exists: false /usr/local/games/critical_test followLinks: true
    exists: false /snap/bin/critical_test followLinks: true
    exists: false /usr/lib/dart/bin/critical_test followLinks: true
    exists: false /home/tsutton/.pub-cache/bin/critical_test followLinks: true
    exists: false /home/tsutton/flutter/bin/critical_test followLinks: true
    exists: false /usr/lib/dart/bin/critical_test followLinks: true
    exists: false /usr/lib/android-sdk/cmdline-tools/latest/bin/critical_test followLinks: true
    exists: false /home/tsutton/.pub-cache/bin/critical_test followLinks: true
    exists: false /home/tsutton/flutter/bin/critical_test followLinks: true
    exists: false /usr/lib/dart/bin/critical_test followLinks: true
    exists: false /usr/lib/android-sdk/cmdline-tools/latest/bin/critical_test followLinks: true
    exists: true /home/tsutton/Projects/dimension_ratios/.gitignore followLinks: true
    read: /home/tsutton/Projects/dimension_ratios/.gitignore, delim: 
    
    exists: true /home/tsutton/Projects/dimension_ratios/.gitignore followLinks: true
    exists: true /home/tsutton/Projects/dimension_ratios/test followLinks: true
    env:  PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/dart/bin:/home/tsutton/.pub-cache/bin:/home/tsutton/flutter/bin:/usr/lib/dart/bin:/usr/lib/android-sdk/cmdline-tools/latest/bin:/home/tsutton/.pub-cache/bin:/home/tsutton/flutter/bin:/usr/lib/dart/bin:/usr/lib/android-sdk/cmdline-tools/latest/bin
    exists: false /usr/local/sbin/critical_test followLinks: true
    exists: false /usr/local/bin/critical_test followLinks: true
    exists: false /usr/sbin/critical_test followLinks: true
    exists: false /usr/bin/critical_test followLinks: true
    exists: false /sbin/critical_test followLinks: true
    exists: false /bin/critical_test followLinks: true
    exists: false /usr/games/critical_test followLinks: true
    exists: false /usr/local/games/critical_test followLinks: true
    exists: false /snap/bin/critical_test followLinks: true
    exists: false /usr/lib/dart/bin/critical_test followLinks: true
    exists: false /home/tsutton/.pub-cache/bin/critical_test followLinks: true
    exists: false /home/tsutton/flutter/bin/critical_test followLinks: true
    exists: false /usr/lib/dart/bin/critical_test followLinks: true
    exists: false /usr/lib/android-sdk/cmdline-tools/latest/bin/critical_test followLinks: true
    exists: false /home/tsutton/.pub-cache/bin/critical_test followLinks: true
    exists: false /home/tsutton/flutter/bin/critical_test followLinks: true
    exists: false /usr/lib/dart/bin/critical_test followLinks: true
    exists: false /usr/lib/android-sdk/cmdline-tools/latest/bin/critical_test followLinks: true
    Unhandled exception:
    Null check operator used on a null value
    #0      exeName (package:pub_release/src/release_runner.dart:437:29)
    #1      ReleaseRunner.doRunTests (package:pub_release/src/release_runner.dart:410:11)
    #2      ReleaseRunner.pubRelease.<anonymous closure> (package:pub_release/src/release_runner.dart:44:18)
    #3      ReleaseRunner.doRun (package:pub_release/src/release_runner.dart:390:17)
    #4      ReleaseRunner.pubRelease (package:pub_release/src/release_runner.dart:36:5)
    #5      main (file:///home/tsutton/.pub-cache/hosted/pub.dartlang.org/pub_release-7.1.11/bin/pub_release.dart:152:14)
    #6      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:281:32)
    #7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
    

    Flutter doctor -v output:

    [✓] Flutter (Channel master, 2.4.0-5.0.pre.105, on Pop!_OS 21.04 5.12.18-xanmod3, locale en_AU.UTF-8)
        • Flutter version 2.4.0-5.0.pre.105 at /home/tsutton/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision a5b9b5774a (2 days ago), 2021-07-19 20:23:45 -0700
        • Engine revision 9edde7423f
        • Dart version 2.14.0 (build 2.14.0-332.0.dev)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
        • Android SDK at /usr/lib/android-sdk
        • Platform android-30, build-tools 29.0.3
        • ANDROID_HOME = /usr/lib/android-sdk
        • Java binary at: /home/tsutton/Downloads/android-studio/jre/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)
        • All Android licenses accepted.
    
    [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
        ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
    
    [✓] Linux toolchain - develop for Linux desktop
        • Ubuntu clang version 12.0.1-1~kisak~h
        • cmake version 3.18.4
        • ninja version 1.10.1
        • pkg-config version 0.29.2
    
    [✓] Android Studio (version 4.2)
        • Android Studio at /home/tsutton/Downloads/android-studio
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)
    
    [✓] VS Code (version 1.57.1)
        • VS Code at /usr/share/code
        • Flutter extension version 3.24.0
    
    [✓] Connected device (1 available)
        • Linux (desktop) • linux • linux-x64 • Pop!_OS 21.04 5.12.18-xanmod3
    
    ! Doctor found issues in 1 category.
    
    opened by relf108 1
  • Support multi-phase test runs.

    Support multi-phase test runs.

    The conduit project has a number of tests that cannot be run in parallel.

    One suggested approach is that we allow a multi-stage testing process.

    Each stage would run using a specific set of tags.

    This will probably need to be done via a config file as the cli arguments would be a bit complex

    pub_release -staged=single,parallel

    Something like the above might work. This would create two stages on run with the 'single' tag and one run with the 'parallel' tag.

    We would need to allow quoting of these as dart tests tags support tag expressions. e.g. single && !windows

    We could create a config file pub_release.yaml with the following sections:

    stages: stage: tag: single thread: 1 stage: parallel threads: 4 stage: single && !windows

    One issue with the above approach is that we may need different switches for each stage.

    For example conduit needs different -j1 switches pass in each stage.

    opened by bsutton 0
  • multi release must only tag once for a mono repo

    multi release must only tag once for a mono repo

    When doing a multi package release in a mono repo we are currently tagging the repo for each project but its in the same repo so this makes no sense.

    We need to change the tagging code so that it only tags the repo once.

    We need to be smart about this as multi should work for mono and non-mono repos.

    opened by bsutton 0
  • 2nd entry of custom version is being ignored.

    2nd entry of custom version is being ignored.

    If you choose to enter a custom version and get it wrong you can re-enter the custom version no.

    The problem is that it then reports that the 'The accepted version is:' and reports the version no. that was entered on the first attempt.

    opened by bsutton 0
Releases(8.2.0)
Owner
Noojee I.T. Pty Ltd
Noojee I.T. Pty Ltd
A Dart package which supports checking if a current package is up-to-date.

pub_updater A Dart package which enables checking whether packages are up to date and supports updating them. Intended for use in CLIs for prompting u

Very Good Open Source 47 Oct 27, 2022
null 2 Apr 17, 2022
A Dart build script that downloads the Protobuf compiler and Dart plugin to streamline .proto to .dart compilation.

A Dart build script that downloads the Protobuf compiler and Dart plugin to streamline .proto to .dart compilation.

Julien Scholz 10 Oct 26, 2022
A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully & easily modifiable.

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully

Muhammad Hamza 20 Jun 7, 2022
A Dart package to web scraping data from websites easily and faster using less code lines.

Chaleno A flutter package to webscraping data from websites This package contains a set of high-level functions that make it easy to webscrap websites

António Nicolau 30 Dec 29, 2022
A pure dart package to apply useful rate limiting strategies on regular functions.

Rate limiting is a strategy for limiting an action. It puts a cap on how often someone can repeat an action within a certain timeframe. Using rate_limiter we made it easier than ever to apply these strategies on regular dart functions.

Stream 24 Dec 14, 2022
This package binds to Cronet's native API to expose them in Dart.

Experimental Cronet Dart bindings This package binds to Cronet's native API to expose them in Dart. This is an HTTP Client Package with almost the sam

Google 103 Dec 9, 2022
Tiny Dart logging package

Tiny Dart logging package

Maksim Lin 2 Aug 3, 2022
The Dart code generator for your package versions. 🎯

The Dart code generator for your package versions. There is no way to get the package version from the code in the Dart ecosystem. Installation Add bu

Daichi Furiya 12 Dec 14, 2022
Flutter_socks_proxy is a dart package, HTTP/Socks4/Socks5 proxy

flutter_socks_proxy flutter_socks_proxy is a dart package, HTTP/Socks4/Socks5 proxy Usage Use global import 'dart:convert';

null 12 Oct 23, 2022
A dart package to help you parse and evaluate infix mathematical expressions into their prefix and postfix notations.

A dart package to help you parse and evaluate infix mathematical expressions into their prefix and postfix notations.

Miguel Manjarres 2 Jan 28, 2022
This package allows programmers to annotate Dart objects in order to Serialize / Deserialize them to / from JSON

This package allows programmers to annotate Dart objects in order to Serialize / Deserialize them to / from JSON. Why? Compatible with all target plat

Alexander Mazuruk 356 Jan 6, 2023
A dart package for decode and encode emv QR code

A dart package for decode and encode emv QR code

Laoitdev Open 4 Nov 15, 2022
Dart package for random strings and numbers, with weights

randomness Dart package for random strings and numbers, with weights Random strings, numbers. RNG with weights. Cryptographically secure options. Gett

null 2 Aug 6, 2022
Dart wrapper via dart:ffi for https://github.com/libusb/libusb

libusb Dart wrapper via dart:ffi for https://github.com/libusb/libusb Environment Windows(10) macOS Linux(Ubuntu 18.04 LTS) Usage Checkout example Fea

Woodemi Co., Ltd 28 Dec 20, 2022
Extensible Dart interpreter for Dart with full interop

dart_eval is an extensible interpreter for the Dart language, written in Dart. It's powered under the hood by the Dart analyzer, so it achieves 100% c

Ethan 169 Dec 28, 2022
Quiver is a set of utility libraries for Dart that makes using many Dart libraries easier and more convenient, or adds additional functionality.

Quiver is a set of utility libraries for Dart that makes using many Dart libraries easier and more convenient, or adds additional functionality.

Google 905 Jan 2, 2023
A flutter package with classes to help testing applications using the canvas

Canvas test helpers MockCanvas is a utility class for writing tests for canvas operations. It supports the same API as the regular Canvas class from d

Blue Fire 12 Jan 31, 2022