Transformer to replace %version%-String in your .html or .dart-Files with the latest GIT-Tag (Version)
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 describe --tags --match <tag> for this.
# 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
yaml ... dev_dependencies: git_version: any transformers: - git_version Your index.html: html <body>Version %version%</body>
Now build your App:
# Go to your local repo showGitVersion # Print help showGitVersion --help
Please file feature requests and bugs at the issue tracker.
Copyright 2017 Michael Mitterer (firstname.lastname@example.org), 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.
Replaces the '%version%' placeholder with your current git version
This CHANGELOG.md was generated with Changelog for Dart
Add this to your package's pubspec.yaml file:
dependencies: git_version: "^0.1.28"
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.1.28||Apr 10, 2018|
|0.1.21||Dec 14, 2017|
|0.1.17||Dec 13, 2017|
|0.1.15||Dec 13, 2017|
|0.1.7||Sep 11, 2017|
|0.1.1||Sep 11, 2017|
We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Detected platforms: Flutter, other
Use constrained dependencies.
pubspec.yamlcontains 1 dependency without version constraints. Specify version ranges for the following dependencies:
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:
example.dartor you could also use
Fix analysis and formatting issues.
Analysis or formatting checks reported 3 hints.
|Dart SDK||>=1.20.1 <2.0.0|