From a69fe80600dfa5b916c87b605a3be4e56f337af4 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Mon, 26 May 2008 21:16:12 +0000 Subject: [PATCH] Added TagRelease --- scripts/TagRelease | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 scripts/TagRelease diff --git a/scripts/TagRelease b/scripts/TagRelease new file mode 100755 index 0000000..6191f26 --- /dev/null +++ b/scripts/TagRelease @@ -0,0 +1,25 @@ +#!/usr/bin/ruby + +def loud_system(command) + $stderr.puts command + system command or raise +end + +releaseName = ARGV[0] +releaseTag = releaseName.gsub(/(\d)(\w)/, '\1_\2').gsub('.', '_') +IO.popen('svn info') do |svn| + svn.each_line do |line| + if line =~ /Repository Root:\s*(\S*)/ + SVN = $1 + break + end + end +end + +TRUNK = File.join(SVN, 'trunk') +TAG = File.join(SVN, 'tags', releaseTag) + +loud_system "svn cp -m 'Releasing #{releaseName}' #{TRUNK} #{TAG}" + + +