packageversion 0.0.19

Generates a simple packageversion module.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

  • 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 D 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.19 2020-May-30
0.0.18 2018-Nov-12
0.0.17 2018-Apr-12
0.0.16 2018-Feb-17
0.0.15 2018-Feb-11
Show all 20 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 1278 downloads total

Score:
0.8
Short URL:
packageversion.dub.pm