Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
cherry pick 646c49f9a35cf1f760519b358405d53bc701aea2
Browse files Browse the repository at this point in the history
switch from svn to git for versions
  • Loading branch information
amet authored and davilla committed Jan 28, 2011
1 parent e4acf11 commit e58b262
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -71,7 +71,7 @@ config.log
/stamp-h1
/xbmc.bin
/xbmc-xrandr
/svn_revision.h
/git_revision.h

# /addons/
/addons/com.nullsoft.milkdrop.xbmc/*.vis
Expand Down
4 changes: 2 additions & 2 deletions XBMC.xcodeproj/project.pbxproj
Expand Up @@ -7186,7 +7186,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Update version in Info.plist with SVN revision\nSVN_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nSVN_REVISION=\"SVN-\"$(cat svn_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$SVN_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
shellScript = "# Update version in Info.plist with Git revision\nGIT_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nGIT_REVISION=\"Git-\"$(cat git_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$GIT_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
};
F5A1CBDE0F6B0B4700A96ABD /* copy root files */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -7229,7 +7229,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Update version in Info.plist with SVN revision\nSVN_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nSVN_REVISION=\"SVN-\"$(cat svn_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$SVN_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
shellScript = "# Update version in Info.plist with Git revision\nGIT_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nGIT_REVISION=\"Git-\"$(cat git_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$GIT_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
};
F5DEC3580E6DEBB2005A4E24 /* copy root files */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
22 changes: 7 additions & 15 deletions configure.in
Expand Up @@ -1118,7 +1118,6 @@ if test "$ARCH" != "x86_64-linux"; then
fi
fi

AC_CHECK_PROG(HAVE_SVNVERSION,svnversion,"yes","no",)
AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)

# Checks for header files.
Expand Down Expand Up @@ -1296,23 +1295,16 @@ else
final_message="$final_message\n Avahi:\tNo"
fi

if ! test -n "$SVN_REV" -a "$SVN_REV" != "" ; then
if test "$HAVE_SVNVERSION" = "yes" ; then
SVN_REV=$(svnversion -n -c 2>/dev/null | grep -iv ^exported | sed -e 's/.*\://')
fi
if test "$SVN_REV" = ""; then
if test "$HAVE_GIT" = "yes"; then
SVN_REV=$(./gitrev.sh)
fi
fi
if test "$SVN_REV" = ""; then
SVN_REV="Unknown"
fi
if test "$HAVE_GIT" = "yes"; then
GIT_REV=$(git rev-parse --short HEAD)
fi
if test "$GIT_REV" = ""; then
GIT_REV="Unknown"
fi
if test "$host_vendor" = "apple"; then
echo "#define SVN_REV \"$SVN_REV\"" > svn_revision.h
echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
else
SDL_DEFINES="$SDL_DEFINES -D'SVN_REV=\"$SVN_REV\"'"
SDL_DEFINES="$SDL_DEFINES -D'GIT_REV=\"$GIT_REV\"'"
fi

if test "$use_nonfree" = "yes"; then
Expand Down
8 changes: 4 additions & 4 deletions guilib/system.h
Expand Up @@ -152,15 +152,15 @@
#endif

/*****************
* SVN revision
* Git revision
*****************/

#ifdef __APPLE__
#include "../svn_revision.h"
#include "../git_revision.h"
#endif

#ifndef SVN_REV
#define SVN_REV "Unknown"
#ifndef GIT_REV
#define GIT_REV "Unknown"
#endif

/****************************************
Expand Down
4 changes: 2 additions & 2 deletions xbmc/Application.cpp
Expand Up @@ -503,9 +503,9 @@ bool CApplication::Create()

CLog::Log(LOGNOTICE, "-----------------------------------------------------------------------");
#if defined(__APPLE__)
CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Mac OS X (%s). Built on %s (SVN:%s)", g_sysinfo.GetUnameVersion().c_str(), __DATE__, SVN_REV);
CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Mac OS X (%s). Built on %s (Git:%s)", g_sysinfo.GetUnameVersion().c_str(), __DATE__, GIT_REV);
#elif defined(_LINUX)
CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Linux (%s, %s). Built on %s (SVN:%s)", g_sysinfo.GetLinuxDistro().c_str(), g_sysinfo.GetUnameVersion().c_str(), __DATE__, SVN_REV);
CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Linux (%s, %s). Built on %s (Git:%s)", g_sysinfo.GetLinuxDistro().c_str(), g_sysinfo.GetUnameVersion().c_str(), __DATE__, GIT_REV);
#elif defined(_WIN32)
CLog::Log(LOGNOTICE, "Starting XBMC, Platform: %s. Built on %s (SVN:%s, compiler %i)",g_sysinfo.GetKernelVersion().c_str(), __DATE__, SVN_REV, _MSC_VER);
CLog::Log(LOGNOTICE, g_cpuInfo.getCPUModel().c_str());
Expand Down
4 changes: 2 additions & 2 deletions xbmc/utils/GUIInfoManager.cpp
Expand Up @@ -3438,8 +3438,8 @@ CTemperature CGUIInfoManager::GetGPUTemperature()
CStdString CGUIInfoManager::GetVersion()
{
CStdString tmp;
#ifdef SVN_REV
tmp.Format("%s r%s", VERSION_STRING, SVN_REV);
#ifdef GIT_REV
tmp.Format("%s Git:%s", VERSION_STRING, GIT_REV);
#else
tmp.Format("%s", VERSION_STRING);
#endif
Expand Down

0 comments on commit e58b262

Please sign in to comment.