Sha256: 17952774f414ff23a7b5f3f19c9dac1a9ba0eaa80874d3a248092f5a0b7e69ad
Contents?: true
Size: 1.52 KB
Versions: 11
Compression:
Stored size: 1.52 KB
Contents
#!/usr/bin/env ruby # Copyright (c) 2009, Keith Salisbury (www.globalkeith.com) # All rights reserved. # All the svn stuff should go in here... require 'fileutils' module Subtrac class Svn def initialize File.create_if_missing(Config.svn_dir) end # creates a new svn repository for the project def create_project(project) # get the client for this project client = project.client # create the client folder File.create_if_missing(File.join(Config.svn_dir,client.path)) # create the project folder project.svn_dir = File.join(Config.svn_dir,client.path,project.path) # TODO: Need to handle this exception... if (File.directory? project.svn_dir) then raise StandardError, "A project called #{project.display_name} already exists in the #{client.display_name} repository. Please delete it or choose an alternate project name and run this script again." end # create a new subversion repository say("Creating a new subversion repository...") `svnadmin create #{project.svn_dir}` # import into svn say("Importing temporary project into the new subversion repository...") `svn import #{project.template}/svn file:///#{project.svn_dir} --message "initial import"` # this should fix the 'can't open activity db error' `sudo chmod 770 #{project.svn_dir}` `sudo chmod 755 #{project.svn_dir}/dav/activities` `sudo chown www-data:www-data #{project.svn_dir}/dav/activities` end end end
Version data entries
11 entries across 11 versions & 1 rubygems