misc: add build_origin_doc to easily build reference document from master
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 9 Jun 2015 03:27:57 +0000 (23:27 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 11 Jun 2015 17:19:07 +0000 (13:19 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

misc/jenkins/build_origin_doc.sh [new file with mode: 0755]

diff --git a/misc/jenkins/build_origin_doc.sh b/misc/jenkins/build_origin_doc.sh
new file mode 100755 (executable)
index 0000000..eea28c7
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This script build the nitdoc bin from in origin/master
+#
+# Result is saved in bin/
+
+current_branch=`git rev-parse --abbrev-ref HEAD`
+
+git checkout origin/master
+bin/nitc src/nitdoc.nit -o bin/nitdoc.orig
+git checkout $current_branch