Revision: 2250
http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2250&view=rev
Author: dermoth
Date: 2009-09-25 09:35:06 +0000 (Fri, 25 Sep 2009)
Log Message:
-----------
Add sfsnapshotgit
From: nagiosplugins <[email protected]>
Added Paths:
-----------
nagiosplug/trunk/tools/sfsnapshotgit
Added: nagiosplug/trunk/tools/sfsnapshotgit
===================================================================
--- nagiosplug/trunk/tools/sfsnapshotgit (rev 0)
+++ nagiosplug/trunk/tools/sfsnapshotgit 2009-09-25 09:35:06 UTC (rev 2250)
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+# Handle command errors (-e) and coder sleep deprivation issues (-u)
+set -eu
+trap 'echo "An error occurred at line $LINENO"; exit 1' EXIT
+
+# Timestamp
+DS=`date -u +%Y%m%d%H%M`
+
+if [ $# -ne 1 ]
+then
+ HEAD='master'
+else
+ HEAD="$1"
+fi
+
+if [ -z "$HEAD" ]
+then
+ echo "If specified, the refspec must not be empty"
+ exit
+fi
+
+# Clean up and pull
+cd ~/staging/nagiosplugins
+git clean -qfdx
+git checkout "$HEAD"
+git pull origin "$HEAD"
+# Tags are important for git-describe
+git fetch --tags origin
+
+# Write our snapshot version string (similar to NP-VERSION-GEN) to "release"
+VS=$(git describe --abbrev=4 HEAD)
+
+# Configure and dist
+tools/setup
+./configure
+make dist VERSION=${VS#release-} RELEASE=snapshot
+
+# The rest is probably going to change... The mv below is for backwards
+# compatibility, however I'd recommend:
+# ln -s nagios-plugins-${VS#release-}.tar.gz nagios-plugins-$HEAD.tar.gz
+# ln -s nagios-plugins-${VS#release-}.tar.gz nagios-plugins-trunk-$DS.tar.gz
+# ln -s nagios-plugins-master.tar.gz nagios-plugins-HEAD.tar.gz
+# NB: the 3rd one would be permannent, no need to do it each time
+# Additionally, we could check whenever we need to re-generate a snapshot.
+# This way we could make snapshots much more often as only symlink changes
+# would have to be uploaded.
+mv nagios-plugins-${VS#release-}.tar.gz nagios-plugins-trunk-$DS.tar.gz
+cp *.tar.gz /tmp/
+
+trap - EXIT
+
Property changes on: nagiosplug/trunk/tools/sfsnapshotgit
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.