Skip to content

Commit

Permalink
add git commit number to the debug output to help us debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Expander authored and Expander committed Oct 25, 2014
1 parent b6092e9 commit 6ec44e7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/config.h.in
Expand Up @@ -8,6 +8,7 @@
#define FLEXIBLESUSY_MINOR @FLEXIBLESUSY_MINOR@
#define FLEXIBLESUSY_PATCH @FLEXIBLESUSY_PATCH@
#define FLEXIBLESUSY_EXTRA "@FLEXIBLESUSY_EXTRA@"
#define GIT_COMMIT "@GIT_COMMIT@"

#define SARAH_VERSION "@SARAH_VERSION@"
#define SARAH_MAJOR @SARAH_MAJOR@
Expand Down
13 changes: 10 additions & 3 deletions configure
Expand Up @@ -9,6 +9,7 @@ FLEXIBLESUSY_MINOR=0
FLEXIBLESUSY_PATCH=2
FLEXIBLESUSY_EXTRA=""
FLEXIBLESUSY_VERSION="${FLEXIBLESUSY_MAJOR}.${FLEXIBLESUSY_MINOR}.${FLEXIBLESUSY_PATCH}${FLEXIBLESUSY_EXTRA}"
GIT_COMMIT="`git describe --tags || echo unknown`"

# directory of this script
BASEDIR=$(dirname $0)
Expand Down Expand Up @@ -270,9 +271,10 @@ logmsg() {

#_____________________________________________________________________
log_package_information() {
logmsg "Package: ${PROGRAM_NAME}"
logmsg "Version: ${FLEXIBLESUSY_VERSION}"
logmsg "Date: ${DATE}"
logmsg "Package: ${PROGRAM_NAME}"
logmsg "Version: ${FLEXIBLESUSY_VERSION}"
logmsg "Date: ${DATE}"
logmsg "Git commit: ${GIT_COMMIT}"
}

#_____________________________________________________________________
Expand Down Expand Up @@ -1938,6 +1940,7 @@ replace_markers() {
-e "s|@FLEXIBLESUSY_MINOR@|$FLEXIBLESUSY_MINOR|" \
-e "s|@FLEXIBLESUSY_PATCH@|$FLEXIBLESUSY_PATCH|" \
-e "s|@FLEXIBLESUSY_EXTRA@|$FLEXIBLESUSY_EXTRA|" \
-e "s|@GIT_COMMIT@|$GIT_COMMIT|" \
-e "s|@PKGNAME@|$PROGRAM_NAME|" \
-e "s|@ABSBASEDIR@|$ABSBASEDIR|" \
-e "s|@INSTALL_DIR@|$INSTALL_DIR|" \
Expand Down Expand Up @@ -2216,6 +2219,7 @@ sed -e "s|@FLEXIBLESUSY_VERSION@|$FLEXIBLESUSY_VERSION|" \
-e "s|@FLEXIBLESUSY_MINOR@|$FLEXIBLESUSY_MINOR|" \
-e "s|@FLEXIBLESUSY_PATCH@|$FLEXIBLESUSY_PATCH|" \
-e "s|@FLEXIBLESUSY_EXTRA@|$FLEXIBLESUSY_EXTRA|" \
-e "s|@GIT_COMMIT@|$GIT_COMMIT|" \
-e "s|@PKGNAME@|$PROGRAM_NAME|" \
-e "s|@CPPFLAGS@|$CPPFLAGS|" \
-e "s|@CXXFLAGS@|$CXXFLAGS|" \
Expand All @@ -2234,6 +2238,7 @@ sed -e "s|@FLEXIBLESUSY_VERSION@|$FLEXIBLESUSY_VERSION|" \
-e "s|@FLEXIBLESUSY_MINOR@|$FLEXIBLESUSY_MINOR|" \
-e "s|@FLEXIBLESUSY_PATCH@|$FLEXIBLESUSY_PATCH|" \
-e "s|@FLEXIBLESUSY_EXTRA@|$FLEXIBLESUSY_EXTRA|" \
-e "s|@GIT_COMMIT@|$GIT_COMMIT|" \
-e "s|@PKGNAME@|$PROGRAM_NAME|" \
-e "s|@BLASLIBS@|$BLASLIBS|" \
-e "s|@BOOSTTESTLIBS@|$BOOSTTESTLIBS|" \
Expand Down Expand Up @@ -2273,6 +2278,7 @@ sed -e "s|@FLEXIBLESUSY_VERSION@|$FLEXIBLESUSY_VERSION|" \
-e "s|@FLEXIBLESUSY_MINOR@|$FLEXIBLESUSY_MINOR|" \
-e "s|@FLEXIBLESUSY_PATCH@|$FLEXIBLESUSY_PATCH|" \
-e "s|@FLEXIBLESUSY_EXTRA@|$FLEXIBLESUSY_EXTRA|" \
-e "s|@GIT_COMMIT@|$GIT_COMMIT|" \
-e "s|@PKGNAME@|$PROGRAM_NAME|" \
< $TEXVERSION_TMPL > $TEXVERSION

Expand All @@ -2281,6 +2287,7 @@ sed -e "s|@FLEXIBLESUSY_VERSION@|$FLEXIBLESUSY_VERSION|" \
-e "s|@FLEXIBLESUSY_MINOR@|$FLEXIBLESUSY_MINOR|" \
-e "s|@FLEXIBLESUSY_PATCH@|$FLEXIBLESUSY_PATCH|" \
-e "s|@FLEXIBLESUSY_EXTRA@|$FLEXIBLESUSY_EXTRA|" \
-e "s|@GIT_COMMIT@|$GIT_COMMIT|" \
-e "s|@PKGNAME@|$PROGRAM_NAME|" \
< $DOC_MAINPAGE_TMPL > $DOC_MAINPAGE

Expand Down
1 change: 1 addition & 0 deletions src/build_info.cpp
Expand Up @@ -59,6 +59,7 @@ void print_version_info(std::ostream& ostr)

ostr <<
"FlexibleSUSY version: " FLEXIBLESUSY_VERSION "\n"
"FlexibleSUSY git commit: " GIT_COMMIT "\n"
"SARAH version: " SARAH_VERSION "\n"
"Mathematica version: " << MATHEMATICA_VERSION << "\n"
"Boost version: " << boost_major << '.' << boost_minor
Expand Down

0 comments on commit 6ec44e7

Please sign in to comment.