packageversion 0.0.15

Generates a simple packageversion module.


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl
  • packageversion [[https://github.com/gizmomogwai/packageversion][https://img.shields.io/github/tag/gizmomogwai/packageversion.svg?style=flat-square]] [[https://travis-ci.org/gizmomogwai/packageversion][https://img.shields.io/travis/gizmomogwai/packageversion/master.svg?style=flat-square]] [[https://codecov.io/gh/gizmomogwai/packageversion][https://img.shields.io/codecov/c/github/gizmomogwai/packageversion/master.svg?style=flat-square]] [[https://gizmomogwai.github.io/packageversion][https://img.shields.io/readthedocs/pip.svg?style=flat-square]]

Packageversion is a simple tool to generate or update version information for a dub package. It uses several mechanisms to find this version:

  1. look into DUBPACKAGEDIR dub.json
  2. look into DUBPACKAGEDIR dub.sdl
  3. use git describe in DUBPACKAGEDIR Because of this strategies its possible to generate also version numbers in builds of dependencies of a dub project.

The generated modules register the package (with its version) to the packageversion api, that then can be used to print the projects (and its dependencies versions).

** Prior art In contrast to [[https://github.com/Abscissa/gen-package-version][gen-package-version]] the version is not time dependent which makes builds more reproducible.

Todos * TODO Change api to use a real package version struct that includes name, version, license, ...

** Best practice for libraries that want to provide a packageversion If your are a library, that wants to provide packageversion information:

  • add packageversion dependency: #+NAME: add depencency #+BEGINSRC: sdl dependency "packageversion" version="~>0.0.15" subConfiguration "packageversion" "library" #+ENDSRC
  • add a call to packageversion's api in a static packageversion module: #+NAME: use packageversion api #+BEGINSRC: dlang module ponies.packageversion; const VERSION = "v0.0.3-24-g1bdc8d6-dirty"; const NAME = "ponies"; const LICENSE = "MIT"; static this() { import packageversion; packageversion.registerPackageVersion(NAME, VERSION, LICENSE); } #+ENDSRC
  • public import your packageversion module so that client of your library link against it automatically.
Authors:
  • Christian Köstlin
Dependencies:
none
Versions:
0.0.18 2018-Nov-12
0.0.17 2018-Apr-12
0.0.16 2018-Feb-17
0.0.15 2018-Feb-11
0.0.14 2018-Feb-08
Show all 19 versions
Download Stats:
  • 0 downloads today

  • 12 downloads this week

  • 44 downloads this month

  • 423 downloads total

Score:
0.7
Short URL:
packageversion.dub.pm