Version information (Lepton EDA Scheme Reference Manual 1.9.18)

Previous: System information, Up: Core API Reference [Contents][Index]

### 2.8 Version information

To use the functions described in this section, you will need to load the `(lepton version)` module.

This section describes functions and variables that can be used to get and report Lepton version data.

The following list of symbols can be used with functions described below to retrieve corresponding version information:

- ‘`prepend`’ Text that is usually prepended when the version information is output.
- ‘`dotted`’ Dotted version info.
- ‘`date`’ Date of the current release.
- ‘`git`’ Git commit hash of the current release.
- ‘`bugs`’ Internet address of Lepton’s bugtracker.
- ‘`url`’ Internet address of Lepton’s main page.
- ‘`copyright`’ General copyright information.

An optional element, ‘`git7`’, can be used to get 7-char prefix of the git commit hash.

Function: lepton-version-ref element

  Returns a single version data string by specified element from the above symbol list.

  For example, you can use ‘`(lepton-version-ref 'copyright)`’ to get copyright info of the library.

      (lepton-version-ref 'git7)
      ⇒ "88acbbd"

Function: lepton-version-data [element-list]

  Returns a list of strings corresponding to the above symbol list (exluding ‘`git7`’) in order. An optional argument element-list can be specified to retrieve any number of the data strings in any order.

      (lepton-version-data 'dotted 'git7)
      ⇒ ("1.9.11" "88acbbd")

Function: lepton-version [format-string . format-args]

  Returns a generic string describing the version of Lepton library currently in use.

  If the optional format-string is specified, it is interpreted as a format string, with format-args as its parameters.

      (lepton-version)
      ⇒ "Lepton EDA 1.9.11.20200604 (git: 88acbbd)"
      (lepton-version "lepton-netlist ~A" 'dotted)
      ⇒ "lepton-netlist 1.9.11"

Function: display-lepton-version [print-name] [copyright] [log]

  Outputs version of a Lepton tool to the current output port or log. If print-name keyword argument is true (‘`#t`’), the basename of the tool is included to the output. If log keyword argument is true (‘`#t`’), the output will go to log instead of standard output port. If copyright is true (‘`#t`’), copyright information will be output as well. By default, all keywords are set to false (‘`#f`’).

      (display-lepton-version)
      -| "Lepton EDA 1.9.11.20200604 (git: 88acbbd)"
      (display-lepton-version #:print-name #t)
      -| "Lepton EDA/lepton-netlist 1.9.11.20200604 (git: 88acbbd)"

Previous: System information, Up: Core API Reference [Contents][Index]