-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildReleaseArchive.rb
36 lines (26 loc) · 1.25 KB
/
BuildReleaseArchive.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
VERS = ARGV[0]
raise("No version number!") unless VERS
def system(command)
puts command
Kernel.system(command)
end
DIR = "/tmp/Chipmunk-#{VERS}"
# Build Objective-Chipmunk
system("cd ../Objective-Chipmunk; ruby BuildReleaseArchive.rb #{VERS}")
# Export, clean, and prepare
system("rm -rf #{DIR}")
system("svn export . #{DIR}")
system("cd #{DIR}; rm BuildReleaseArchive.rb TODO.txt ReleaseChecklist.txt UploadArchive.rb")
system("mkdir -p #{DIR}/Objective-Chipmunk/")
# Build docs
system("cd #{DIR}/doc/doc-src; ruby make_docs.rb")
# Copy in Objective-Chipmunk stuff
system("cp -R ../Objective-Chipmunk/doxygen/html/ #{DIR}/Objective-Chipmunk/API\\ Docs");
system("mkdir -p #{DIR}/Objective-Chipmunk/Objective-Chipmunk")
system("cp -R ../Objective-Chipmunk/Objective-Chipmunk-simulator #{DIR}/Objective-Chipmunk/Objective-Chipmunk/")
system("cp -R ../Objective-Chipmunk/Readme.rtf #{DIR}/Objective-Chipmunk/Objective-Chipmunk/")
system("svn export ../iPhoneChipmunk #{DIR}/Objective-Chipmunk/iPhoneChipmunk")
system("svn export ../iPhoneSnap #{DIR}/Objective-Chipmunk/iPhoneSnap")
system("svn export ../SimpleObjectiveChipmunk #{DIR}/Objective-Chipmunk/SimpleObjectiveChipmunk")
system("tar -C /tmp -czf Chipmunk-#{VERS}.tgz Chipmunk-#{VERS}/")
system("open #{DIR}")