Added version.js
parent
50d17c3ad4
commit
a76fd811ed
|
@ -6,6 +6,7 @@ configure
|
||||||
Makefile.in
|
Makefile.in
|
||||||
|
|
||||||
# generated by configure
|
# generated by configure
|
||||||
|
src/version.js
|
||||||
config.*
|
config.*
|
||||||
Makefile
|
Makefile
|
||||||
package.json
|
package.json
|
||||||
|
|
|
@ -22,6 +22,13 @@ AC_INIT([liza], [0.0.1-dev], [dev@lovullo.com])
|
||||||
AC_CONFIG_AUX_DIR([tools])
|
AC_CONFIG_AUX_DIR([tools])
|
||||||
AM_INIT_AUTOMAKE([foreign])
|
AM_INIT_AUTOMAKE([foreign])
|
||||||
|
|
||||||
|
# provide more granular version numbers based on the above AC_INIT line
|
||||||
|
m4_define([ver_split], m4_split(m4_translit(AC_PACKAGE_VERSION, [-], [.]), [\.]))
|
||||||
|
AC_SUBST(MAJOR, m4_argn(1, ver_split))
|
||||||
|
AC_SUBST(MINOR, m4_argn(2, ver_split))
|
||||||
|
AC_SUBST(REV, m4_argn(3, ver_split))
|
||||||
|
AC_SUBST(SUFFIX, m4_argn(4, ver_split))
|
||||||
|
|
||||||
# generate files from their *.in counterparts
|
# generate files from their *.in counterparts
|
||||||
AC_CONFIG_FILES([Makefile doc/Makefile package.json])
|
AC_CONFIG_FILES([Makefile doc/Makefile package.json src/version.js])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
7
index.js
7
index.js
|
@ -19,8 +19,9 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// as soon as we have something to export, this will be replaced with a
|
// as soon as we have something useful to export, this will contain classes
|
||||||
// module.exports line containing an object that itself contains classes
|
|
||||||
// that represent common, viable entry points for the framework (e.g.
|
// that represent common, viable entry points for the framework (e.g.
|
||||||
// facades).
|
// facades).
|
||||||
throw Error( "You're too early! Check back soon." );
|
module.exports = {
|
||||||
|
version: require( __dirname + '/src/version' )
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
/**
|
||||||
|
* Provides version information
|
||||||
|
*
|
||||||
|
* Copyright (C) 2014 LoVullo Associates, Inc.
|
||||||
|
*
|
||||||
|
* This file is part of liza.
|
||||||
|
*
|
||||||
|
* liza is free software: you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, either version 3 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* Taken from GNU ease.js.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var major = @MAJOR@,
|
||||||
|
minor = @MINOR@,
|
||||||
|
rev = @REV@,
|
||||||
|
suffix = '@SUFFIX@',
|
||||||
|
|
||||||
|
version = [ major, minor, rev, suffix ];
|
||||||
|
|
||||||
|
version.major = major;
|
||||||
|
version.minor = minor;
|
||||||
|
version.rev = rev;
|
||||||
|
version.suffix = suffix;
|
||||||
|
|
||||||
|
version.toString = function()
|
||||||
|
{
|
||||||
|
return this.join( '.' )
|
||||||
|
.replace( /\.([^.]+)$/, '-$1' )
|
||||||
|
.replace( /-$/, '' );
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = version;
|
Loading…
Reference in New Issue