Commit 693ddd9a authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-c/1847' into 'dev'

Display sha1 in the client

Closes #1847

See merge request !52
parents b50668de 95b586eb
Pipeline #2607 passed with stages
in 2 minutes and 34 seconds
......@@ -3,6 +3,7 @@
before_script:
- make data
- make germline
- make -C browser sha1
stages:
- test_quality
......
#!/bin/sh
GITV_H=git-version.h
GITV_H_TMP=git-version.h.tmp
touch ${GITV_H}
git log -1 --pretty=format:'#define GIT_VERSION "%h (%cd)"' --date=short --abbrev-commit > ${GITV_H_TMP} 2> /dev/null
# Replace the file only when the new file is different
diff ${GITV_H} ${GITV_H_TMP} || mv ${GITV_H_TMP} ${GITV_H}
../tools/create-git-sha1.sh git-version.h "#define GIT_VERSION"
......@@ -3,6 +3,9 @@ all: germline icons
germline:
$(MAKE) -C .. $@
sha1:
../tools/create-git-sha1.sh js/git-sha1.js "git_sha1 ="
icons:
$(MAKE) -C css/icons
......
......@@ -21,6 +21,10 @@ require(["jquery",
});
// Show git_sha1, when it exists
require(["../git-sha1"], function () { console.log("Vidjil client " + git_sha1) }, function(err) { })
function loadAfterConf() {
// Then load views (otherwise that could generate some errors if
// some files are loaded before the views)
......
......@@ -90,7 +90,9 @@ function Com(default_console) {
BUTTON_CLOSE_POPUP,
"welcome": " <h2>Vidjil <span class='logo'>(beta)</span></h2>" +
"(c) 2011-2016, the Vidjil team" + "<br />Marc Duez, Mathieu Giraud, Ryan Herbert, Mikaël Salson, Tatiana Rocher and Florian Thonier" +
"(c) 2011-2017, the Vidjil team " +
(typeof git_sha1 !== "undefined" ? "&ndash; " + git_sha1 : "") + "</br>" +
"<br />Aurélien Béliard, Marc Duez, Mathieu Giraud, Ryan Herbert, Mikaël Salson, Tatiana Rocher and Florian Thonier" +
" &ndash; <a href='http://www.vidjil.org'>http://www.vidjil.org/</a>" + "</br>" +
"</br>Vidjil is developed by the <a href='http://cristal.univ-lille.fr/bonsai'>Bonsai bioinformatics team</a> (CRIStAL, CNRS, Univ. Lille, Inria Lille), " +
"in collaboration with the <a href='http://biologiepathologie.chru-lille.fr/organisation-fbp/91210.html'>department of Hematology</a> of CHRU Lille, " +
......
......@@ -22,7 +22,7 @@ def index():
disk_use, err = p.communicate()
revision = 'not versioned'
try:
p = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE)
p = subprocess.Popen(["git", "log", "-1", "--pretty=format:'%h (%cd)'", "--date=short", "--abbrev-commit"], stdout=subprocess.PIPE)
revision, err = p.communicate()
except:
pass
......
#!/bin/sh
# Create a file with the current sha1
# sh create-git-sha1.sh ../algo/git-version.h "#define GIT_VERSION"
# sh create-git-sha1.sh ../browser/js/git-sha1.js "git_sha1 ="
GITV_H=$1
GITV_H_TMP=${GITV_H}.tmp
PRETTY_PREFIX=$2
touch ${GITV_H}
git log -1 --pretty=format:"${PRETTY_PREFIX} \"%h (%cd)\"" --date=short --abbrev-commit > ${GITV_H_TMP} 2> /dev/null
# Replace the file only when the new file is different
diff ${GITV_H} ${GITV_H_TMP} || mv ${GITV_H_TMP} ${GITV_H}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment