About News Download Docs Bugs Contact

Grimoire/API

Information

Tools

Resources

Grimoire build API

A file named API_VERSION may exist at the grimoire level and/or the section level. In this file one variable may be defined: BUILD_API.

This variable may be given the values '1' or '2'. To denote which build API the grimoire or section uses.

In addition BUILD_API may also be defined in a spell's DETAILS file.

API_VERSION file must have the executable bit set (so a test -x passes).

The files are sourced in the following order:

  1. $GRIMOIRE/API_VERSION
  2. $SECTION/API_VERSION
  3. $SPELL/DETAILS

Thus the section level will override the grimoire level and the spell level will override the section and grimoire levels.

If the BUILD_API variable is not defined the behavior defaults to it being defined as '2'.

A quick rundown of what '1' and '2' mean:

Build API 1:

PRE_BUILDBUILDPOST_BUILDPOST_INSTALLTRIGGERS

Build API 2:

PRE_BUILDBUILDPRE_INSTALLINSTALLINSTALL_EXTRASPOST_INSTALLTRANSFERFINALTRIGGERS

Note: do not write spells in build API 1, use build API 2 instead!