[GRASS-SVN] r65727 - in grass-addons/tools: . grass-ci

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jul 20 12:59:33 PDT 2015


Author: martinl
Date: 2015-07-20 12:59:33 -0700 (Mon, 20 Jul 2015)
New Revision: 65727

Added:
   grass-addons/tools/grass-ci/
   grass-addons/tools/grass-ci/authors-prog.sh
   grass-addons/tools/grass-ci/grass-ci.sh
   grass-addons/tools/grass-ci/ssh.sh
Log:
add grass-ci scripts (thanks to Ivan Mincik)

Added: grass-addons/tools/grass-ci/authors-prog.sh
===================================================================
--- grass-addons/tools/grass-ci/authors-prog.sh	                        (rev 0)
+++ grass-addons/tools/grass-ci/authors-prog.sh	2015-07-20 19:59:33 UTC (rev 65727)
@@ -0,0 +1,8 @@
+#!/bin/bash
+# Assign unknown email value to all unknown SVN commiters, which doesn't exist in grass-authors.txt file.
+
+# Author: Ivan Mincik, ivan.mincik at gmail.com
+
+echo "$1 <unknown-email>"
+
+# vim: set ts=4 sts=4 sw=4 noet:


Property changes on: grass-addons/tools/grass-ci/authors-prog.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: grass-addons/tools/grass-ci/grass-ci.sh
===================================================================
--- grass-addons/tools/grass-ci/grass-ci.sh	                        (rev 0)
+++ grass-addons/tools/grass-ci/grass-ci.sh	2015-07-20 19:59:33 UTC (rev 65727)
@@ -0,0 +1,52 @@
+#!/bin/bash
+# Sync GRASS source code for CI.
+
+# REQUIREMENTS
+# ------------
+# * git-svn
+# * authors-prog.sh
+# * grass-ci-ssh-key
+# * grass-ci-ssh-key.pub
+# * ssh.sh
+
+# REPOSITORY INITIALIZATION (DO IT ONLY ONCE)
+# -------------------------------------------
+# $ mkdir grass-ci
+# $ cd grass-ci
+# $ wget https://trac.osgeo.org/grass/export/HEAD/grass/trunk/contributors.csv
+# $ awk -F "," '{gsub(" ", "@", $3); print $5 " = " $2 " " $3}' ./contributors.csv | grep -v "^osgeo_id" | grep -v "^-"  > grass-authors.txt
+# $ git svn clone -s -r 65500:HEAD https://svn.osgeo.org/grass/grass/ --authors-file=grass-authors.txt --authors-prog=authors-prog.sh --prefix=svn/
+# $ cd grass
+# $ git remote add origin git at github.com:GRASS-GIS/grass-ci.git
+# $ cd .. && grass-ci.sh
+
+# SOURCE CODE SYNC (RUN EVERY FIVE MINUTES)
+# ----------------------------------------
+# Create cron job file '/etc/cron.d/grass-ci' with following content:
+# */5 * * * *  username  /path/to/grass-ci/grass-ci.sh
+
+# URLs
+# ----
+# * GitHub page    - https://github.com/GRASS-GIS/grass-ci
+# * Travis CI page - https://travis-ci.org/GRASS-GIS/grass-ci
+
+# Author: Ivan Mincik, ivan.mincik at gmail.com
+
+set -e
+
+GRASS_CI_DIR=$(dirname "$(readlink -f "$0")")
+export GRASS_CI_DIR
+
+# configure SSH key
+export GIT_SSH=$GRASS_CI_DIR/ssh.sh
+
+# update src
+cd $GRASS_CI_DIR/grass
+REBASE_LOG=$(git svn rebase --authors-file=../grass-authors.txt --authors-prog=../authors-prog.sh)
+git push -u origin master
+
+# write log
+echo -e "\n$(date -R)" >> $GRASS_CI_DIR/grass-ci.log
+echo "$REBASE_LOG" >> $GRASS_CI_DIR/grass-ci.log
+
+# vim: set ts=4 sts=4 sw=4 noet:


Property changes on: grass-addons/tools/grass-ci/grass-ci.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: grass-addons/tools/grass-ci/ssh.sh
===================================================================
--- grass-addons/tools/grass-ci/ssh.sh	                        (rev 0)
+++ grass-addons/tools/grass-ci/ssh.sh	2015-07-20 19:59:33 UTC (rev 65727)
@@ -0,0 +1,8 @@
+#!/bin/bash
+# SSH client wrapper script used to specify private key
+
+# Author: Ivan Mincik, ivan.mincik at gmail.com
+
+exec /usr/bin/ssh -o StrictHostKeyChecking=no -i $GRASS_CI_DIR/grass-ci-ssh-key "$@"
+
+# vim: set ts=4 sts=4 sw=4 noet:


Property changes on: grass-addons/tools/grass-ci/ssh.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the grass-commit mailing list