packageversion 0.0.18

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 [[][]] [[][]] [[][]] [[][]]

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 [[][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.
  • Christian Köstlin
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

  • 1277 downloads total

Short URL: