git_version 0.1.21

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 68

GitVersion

Transformer to replace %version%-String in your .html or .dart-Files with the latest GIT-Tag (Version)

Important

If your version schema should have three digits (e.g. v.1.0.0),
tag it only with two digits e.g. git tag v1.0 and let GitVersion do the the rest.

GitVersion counts the commits for a specific version tag and adds the number of commits as the last digit.

git_version uses git describe --tags --match <tag> for this.

Precondition

# Init your GIT repo
git init

# Add your repo
git remote add origin <your repo>
     
# Make your first commit
git commit -am "Initial release"

# Tag your version
git tag v0.1

# Install showGitVersion cmdline tool
pub global activate git_version

Usage

Transformer

Your pubspec.yaml:

yaml
...
dev_dependencies:
  git_version: any

transformers:
  - git_version


Your index.html:

html
<body>Version %version%</body>


Now build your App:

pub build    

Commandline

# Go to your local repo
showGitVersion

# Print help
showGitVersion --help
 

Features and bugs

Please file feature requests and bugs at the issue tracker.

Licence

Copyright 2017 Michael Mitterer (office@mikemitterer.at),
IT-Consulting and Development Limited

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the <organization> nor the
      names of its contributors may be used to endorse or promote products
      derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Change Log for git_version

Replaces the '%version%' placeholder with your current git version

Unreleased

Fixes

  • Fixes rendering problem in pub c61dbc2

Docs

  • Clarified what version means in this context e1dbc46
  • How to tag for specific version schema 79887b0
  • How to tag for specific version schema 845a8af

Refactor

  • Updated log-handler dependencies 7d54047

This CHANGELOG.md was generated with Changelog for Dart

1. Depend on it

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


dependencies:
  git_version: "^0.1.21"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:git_version/git_version.dart';
        
Version Uploaded Documentation Archive
0.1.21 Dec 14, 2017 Go to the documentation of git_version 0.1.21 Download git_version 0.1.21 archive
0.1.17 Dec 13, 2017 Go to the documentation of git_version 0.1.17 Download git_version 0.1.17 archive
0.1.15 Dec 13, 2017 Go to the documentation of git_version 0.1.15 Download git_version 0.1.15 archive
0.1.7 Sep 11, 2017 Go to the documentation of git_version 0.1.7 Download git_version 0.1.7 archive
0.1.1 Sep 11, 2017 Go to the documentation of git_version 0.1.1 Download git_version 0.1.1 archive

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
37 / 100
Health:
Code health derived from static analysis. [more]
98 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
68

Platforms

Detected platforms: Flutter, other

Primary library: package:git_version/git_version.dart with components: io.

Suggestions

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use git_version.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
barback ^0.15.0 0.15.2+14
console_log_handler >=0.5.0 <1.0.0 0.5.7
logging >=0.11.3 <1.0.0 0.11.3+1
where ^1.1.0 1.1.0 3.0.0
Transitive dependencies
ansicolor 0.0.9
args 1.3.0
async 2.0.3
browser 0.10.0+2
charcode 1.1.1
collection 1.14.5
intl 0.15.2
meta 1.1.2
path 1.5.1
pool 1.3.4
source_span 1.4.0
stack_trace 1.9.1
supports_color 0.1.1
Dev dependencies
grinder any
test ^0.12.0