Make_sofa_version creates an Eiffel class with version information accessible via attributes, including an AmigaOS version tag. It is to some extend comparable with BumpRev from the NDK.
It simplifies keeping the programs output up to date concerning version information, and supports AmigaOS-internal tools like the version command or Installer's copylibs statement.
For example, the invocation
make_sofa_version to=make_sofa_version_info 1 0 make_sofa_version "BumpRev for Eiffel"
will create a class MAKE_SOFA_VERSION_INFO in the current directory, which contains version information about an application make_sofa_version. A short discription of this application is "BumpRev for Eiffel". The current version is 1.0. Essentially, the class will declare the following constants:
version: INTEGER is 1
-- version number
revision: INTEGER is 0
-- revision number
date: STRING is "30.3.00"
-- date of last change
application: STRING is "make_sofa_version"
-- name of application
description: STRING is "BumpRev for Eiffel"
-- short description of application
The AmigaOS version tag is a feature exported to NONE:
amiga_version_tag: STRING is "$VER: make_sofa_version 1.0 (30.3.00)"
-- tag for AmigaOS "version" command
In a client class, all you have to do is declare an attribute of the same type as the class just created, and initialize it:
info: MAKE_SOFA_VERSION_INFO; ... !! info.make
After that, you could use the following code to display the version number:
print("this is version ")
print(info.version)
print(".")
print(info.release)
The source code of make_sofa_version_info is an example for several things: