pubspec_version 0.5.0

pubver #

CLI tool to set/bump the version key in pubspec.yaml. Semver-compliant (Almost. It uses pub_semver which is a bit different.)

Installing #

Install the package from the command line:

pub global activate pubspec_version

This will add the pubver binary to your ~/.pub-cache/bin.

Usage #

Bumping the version #

pubver bump <part>

where <part> can be either breaking, major, minor, patch or build.

Examples #

BeforeCommandAfter
1.2.3pubver bump breaking2.0.0
0.2.1pubver bump breaking0.3.0
0.2.1pubver bump major1.0.0
0.2.1pubver bump minor0.3.0
0.2.1pubver bump patch0.2.2
0.2.1pubver bump build0.2.1+1
0.2.1+42pubver bump build0.2.1+43
0.2.1+foopubver bump build0.2.1+foo.1
0.2.1+42.foopubver bump build0.2.1+43.foo
0.2.1+foo.bar.1.2pubver bump build0.2.1+foo.bar.2.0

The bump build command is a bit tricky. It either increments the first numeric part of the build (if there is a numeric part) setting other numeric parts to zeroes, or appends .1 to the build (otherwise).

Setting the version #

pubver set <version>

where <version> can be any arbitrary version.

Getting the version #

pubver get

Output #

The tool prints the new version to stdout. This allows post processing, e.g. making a git commit.

git ci . -m "Release $(pubver bump breaking)"

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased #

0.5.0 - 2019-08-18

Changed #

  • the bump build command sets the subsequent numeric build parts to zeroes

0.4.0 - 2019-08-18

Added #

  • the bump build command

0.3.0 - 2019-05-29

Added #

  • the get command (PR)

0.2.2 - 2018-11-16

Changed #

  • Minor documentation changes.

0.2.1 - 2018-11-16

Changed #

  • Minor documentation changes.

0.2.0 - 2018-11-16

Breaking change #

  • This is now a standalone cli app.

0.1.0 - 2018-10-05

Changed #

  • Binary names

0.0.2 - 2018-10-04

Fixed #

  • Removed double await statement (#1)

0.0.1 - 2018-10-03 #

Added #

  • Initial version

example/readme.md

Examples #

BeforeCommandAfter
1.2.3pubver bump breaking2.0.0
0.2.1pubver bump breaking0.3.0
0.2.1pubver bump major1.0.0
0.2.1pubver bump minor0.3.0
0.2.1pubver bump patch0.2.1
0.2.1pubver set 5.4.3-dev5.4.3-dev

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate pubspec_version

2. Use it

The package has the following executables:


$ pubver

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  pubspec_version: ^0.5.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:pubspec_version/pubspec_version.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
14
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
57
Learn more about scoring.

We analyzed this package on Aug 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: other

Primary library: package:pubspec_version/pubspec_version.dart with components: io, mirrors.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
args ^1.5.0 1.5.2
pub_semver ^1.4.2 1.4.2
pubspec ^0.1.0 0.1.2
Transitive dependencies
charcode 1.1.2
collection 1.14.12
matcher 0.12.5
meta 1.1.7
path 1.6.4
quiver 2.0.5
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.5
stuff 0.1.0
term_glyph 1.1.0
uri 0.11.3+1
utf 0.9.0+5
yaml 2.1.16
Dev dependencies
mockito ^3.0.0
test ^1.0.0