VocalEasel/scripts/BuildSourceDist

28 lines
597 B
Plaintext
Raw Permalink Normal View History

2008-05-26 21:53:28 +00:00
#!/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
TAG = File.join(SVN, 'tags', releaseTag)
loud_system "rm -rf Releases/#{releaseName}"
loud_system "svn export #{TAG} Releases/#{releaseName}"
loud_system "cd Releases && tar zcf #{releaseName}_src.tgz #{releaseName}"
loud_system "rm -rf Releases/#{releaseName}"