From 2b6ab6f63c300a94b03daa803ac5da6f88ed1724 Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Fri, 29 Sep 2017 13:35:09 +0200
Subject: [PATCH] Special doxygen command for unmaintained branches

pushdoc script uses it to know if branches are supported or not
---
 .travis/pushdoc   | 3 +--
 CHANGES/v2.0.txt  | 3 +--
 CHANGES/v2.1.txt  | 4 ++--
 CHANGES/v2.2.txt  | 2 +-
 user-doc/Doxyfile | 3 ++-
 5 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/.travis/pushdoc b/.travis/pushdoc
index e6727690f..c871389e5 100755
--- a/.travis/pushdoc
+++ b/.travis/pushdoc
@@ -4,8 +4,7 @@ set -e
 set -x
 
 if [[ "$TRAVIS_BRANCH" =~ ^v2\.[0-9]+$ ]] ; then
-# TODO: this should be made automatic by reading the CHANGES/*.txt files:
-  if [ "$TRAVIS_BRANCH" = v2.0 ] || [ "$TRAVIS_BRANCH" = v2.1 ] || [ "$TRAVIS_BRANCH" = v2.2 ] ; then
+  if test -f CHANGES/"$TRAVIS_BRANCH".txt && grep -q plumednotmaintained CHANGES/"$TRAVIS_BRANCH".txt ; then
     branchtype=unsupported
   else
     branchtype=official
diff --git a/CHANGES/v2.0.txt b/CHANGES/v2.0.txt
index 659a47c21..84ea874d7 100644
--- a/CHANGES/v2.0.txt
+++ b/CHANGES/v2.0.txt
@@ -142,8 +142,7 @@ For developers:
 Version 2.0.5 (Dec 15, 2014)
 ----------------------------------------------
 
-Notice that branch 2.0 will not be longer maintained!
-All users are invited to switch to version 2.1.
+\plumednotmaintained
 
 For users:
 - Fixed a bug in replica exchange with different Hamiltonians (either lamdba-dynamics
diff --git a/CHANGES/v2.1.txt b/CHANGES/v2.1.txt
index 320e3745f..b9ea5181c 100644
--- a/CHANGES/v2.1.txt
+++ b/CHANGES/v2.1.txt
@@ -243,8 +243,8 @@ For users:
 
 Version 2.1.5 (Jan 18, 2016)
 ---------------------------------------------
-Notice that branch 2.1 will not be longer maintained!
-All users are invited to switch to version 2.2.
+
+\plumednotmaintained
 
 For users:
 - PLUMED now reports an error when using \ref HISTOGRAM with FREE-ENERGY without USE_ALL_DATA. See \issue{175}
diff --git a/CHANGES/v2.2.txt b/CHANGES/v2.2.txt
index 500995845..721bb3c86 100644
--- a/CHANGES/v2.2.txt
+++ b/CHANGES/v2.2.txt
@@ -185,7 +185,7 @@ For developers:
 Version 2.2.5 (Mar 31, 2017)
 -------------
 
-Notice that branch 2.2 will not be longer maintained! All users are invited to switch to version 2.3.
+\plumednotmaintained
 
 For users:
 - Fixed a problem with large step numbers in driver (see \issue{209}).
diff --git a/user-doc/Doxyfile b/user-doc/Doxyfile
index fdcd5c477..dbb2887b4 100644
--- a/user-doc/Doxyfile
+++ b/user-doc/Doxyfile
@@ -232,7 +232,8 @@ ALIASES                = "hidden=\htmlonly <details> <summary> <b> To learn more
                          "hidden{1}=\htmlonly <details> <summary> <b> To learn more: \1 </b> </summary> <div class=\"hidden\"> \endhtmlonly" \
                          "endhidden=\htmlonly </div> </details> \endhtmlonly" \
                          "issue{1}=<a href=\"http://github.com/plumed/plumed2/issues/\1\">#\1</a>" \
-                         "branch{1}=<a href=\"http://github.com/plumed/plumed2/commits/\1\">\1</a>"
+                         "branch{1}=<a href=\"http://github.com/plumed/plumed2/commits/\1\">\1</a>" \
+                         "plumednotmaintained=\warning This branch is not maintained. Users are invited to upgrade to a newest version"
 
 # This tag can be used to specify a number of word-keyword mappings (TCL only).
 # A mapping has the form "name=value". For example adding "class=itcl::class"
-- 
GitLab