diff --git a/.gitignore b/.gitignore
index bed435bb9af..b1469eb2195 100644
--- a/.gitignore
+++ b/.gitignore
@@ -96,6 +96,7 @@ py/Boinc/version.py
py/setup.py
stamp-h1
test/version.inc
+html/inc/release.inc
## files created by make:
*.o
diff --git a/generate_svn_version.sh b/generate_svn_version.sh
index 0c469d15be0..a94ba7fd9e9 100644
--- a/generate_svn_version.sh
+++ b/generate_svn_version.sh
@@ -19,6 +19,7 @@ elif [ -d .git ]; then
fi
URL=`git config --get remote.$remote.url`
DATE=`git log -n1 --pretty="format:%ct"`
+ SERVER_VERSION=`git describe --abbrev=0 --match server_release/*`
elif [ -d .svn ]; then
CMD="svn info"
else
@@ -26,7 +27,7 @@ else
fi
if [ "x$GIT_LOG" != "x" ]; then
- echo "#define SVN_VERSION \"$GIT_LOG [$URL] ($HOST:$PWD [$BRANCH])\"" >> $TMPFILE
+ echo "#define SVN_VERSION \"$GIT_LOG [$URL] ($HOST:$PWD [$BRANCH]) [Server-Release: $SERVER_VERSION]\"" >> $TMPFILE
echo "$GIT_LOG" | sed 's/^\(........\).*/#define GIT_REVISION 0x\1/' >> $TMPFILE
echo "#define GIT_DATE $DATE" >> $TMPFILE
test "x$URL" = "x" ||
@@ -61,3 +62,16 @@ if cmp "$HEADER" "$TMPFILE" >/dev/null 2>&1; then
else
mv "$TMPFILE" "$HEADER"
fi
+
+if [ ! -z ${SERVER_VERSION} ]; then
+ SERVER_VERSION=`echo ${SERVER_VERSION} | sed 's#.*/##'`
+ cat << EOF > html/inc/release.inc
+
+EOF
+
+fi
diff --git a/html/user/get_project_config.php b/html/user/get_project_config.php
index b47f1d9ec4c..63c24bd736e 100644
--- a/html/user/get_project_config.php
+++ b/html/user/get_project_config.php
@@ -19,8 +19,8 @@
require_once("../inc/consent.inc");
require_once("../inc/util.inc");
require_once("../inc/xml.inc");
-if(file_exists('../../release.inc'))
- include '../../release.inc';
+if(file_exists('../inc/release.inc'))
+ include '../inc/release.inc';
BoincDb::get(true);
xml_header();
@@ -66,10 +66,6 @@ function show_platforms() {
".secure_url_base()."
";
-if ( isset($git_commit) ) {
- echo "$git_commit\n";
-}
-
if ( isset($server_version) ) {
echo "$server_version\n";
}
diff --git a/html/user/server_status.php b/html/user/server_status.php
index 483d63e4ae5..25ef278c13b 100644
--- a/html/user/server_status.php
+++ b/html/user/server_status.php
@@ -30,8 +30,8 @@
require_once("../inc/util.inc");
require_once("../inc/xml.inc");
require_once("../inc/boinc_db.inc");
-if(file_exists('../../release.inc'))
- include '../../release.inc';
+if(file_exists('../inc/release.inc'))
+ include '../inc/release.inc';
if (!defined('STATUS_PAGE_TTL')) {
define('STATUS_PAGE_TTL', 3600);
@@ -187,9 +187,10 @@ function show_status_html($x) {
end_table();
global $server_version;
- global $git_commit;
- if ( isset($server_version) && isset($git_commit) ) {
- echo "Server version: $server_version ($git_commit))
";
+ if ( isset($server_version) ) {
+ $url = "https://github.com/BOINC/boinc/tree/server_release/";
+ $url .= explode(".", $server_version)[0] . "." . explode(".", $server_version)[1] . "/" . "$server_version";
+ echo "Upstream server release: $server_version
";
}
if ($j->db_revision) {
diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py
index 35085e67f89..79d457fd93d 100644
--- a/py/Boinc/setup_project.py
+++ b/py/Boinc/setup_project.py
@@ -9,7 +9,6 @@
from Boinc import database, db_mid, configxml, tools
from Boinc.boinc_db import *
import os, sys, glob, time, shutil, re, random
-import subprocess
class Options:
pass
@@ -340,31 +339,6 @@ def dir(*dirs):
shutil.copy(srcdir('html/user/sample_motd.php'), dir('html/user/motd.php'))
os.system("rm -f "+dir('html/languages/translations/*'))
install_glob(srcdir('html/languages/translations/*.po'), dir('html/languages/translations/'))
- try:
- os.remove(os.path.join(dest_dir, 'release.inc'))
- except OSError:
- pass
- try:
- s = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE, stderr=open(os.devnull, 'w'))
- commit = s.stdout.read()[:7]
- s = subprocess.Popen(["git", "describe", "--match", "server_release/*", "--tags", "--exact", "HEAD"],
- stdout=subprocess.PIPE, stderr=open(os.devnull, 'w'))
- version = s.stdout.read().split("/")[-1].strip()
- content = '''
-'''.format(commit=commit, version=version)
- f = open(os.path.join(dest_dir, 'release.inc'), 'w')
- f.write(content)
- f.close()
- os.chmod(os.path.join(dest_dir, 'release.inc'), 0o644)
- except Exception, e:
- print 'Not running from git source, no version or commit detected.'
-
# copy Python stuff
map(lambda (s): install(srcdir('sched',s), dir('bin',s)),