File: BuildReleaseArchive.rb

package info (click to toggle)
chipmunk 7.0.3-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,968 kB
  • sloc: ansic: 29,265; objc: 4,313; ruby: 409; makefile: 10; sh: 1
file content (43 lines) | stat: -rwxr-xr-x 1,023 bytes parent folder | download | duplicates (3)
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
37
38
39
40
41
42
43
VERS = ARGV[0]
raise("No version number!") unless VERS

DOXYGEN_PATH = "/Applications/Doxygen.app/Contents/Resources/doxygen"

def system(command)
	puts command
	Kernel.system(command)
end

# Build mainline Chipmunk
CHIPMUNK_DIRNAME = "Chipmunk-#{VERS}"
CHIPMUNK_TMP_PATH = "/tmp/#{CHIPMUNK_DIRNAME}"

system "rm -rf '#{CHIPMUNK_TMP_PATH}'"
system "(git archive --prefix='#{CHIPMUNK_DIRNAME}/' HEAD | tar -xC /tmp)"

Dir.chdir("#{CHIPMUNK_TMP_PATH}/doc-src"){
	system "ruby doxygen_generator.rb"
	system "'#{DOXYGEN_PATH}' Doxyfile"
}

Dir.chdir(CHIPMUNK_TMP_PATH){
	system "(cd doc-src && ruby MakeDocs.rb)"
	
	white_list = [
		"CMakeLists.txt",
		"demo",
		"doc",
		"extract_protos.rb",
		"include",
		"LICENSE.txt",
		"xcode",
		"msvc",
		"README.textile",
		"src",
		"objectivec",
		"VERSION.txt",
	]
	Dir.glob("*"){|filename| system "rm -rf #{filename}" unless white_list.include?(filename)}
}

system "tar -czf '#{CHIPMUNK_TMP_PATH}.tgz' -C '#{File.dirname(CHIPMUNK_TMP_PATH)}' '#{File.basename(CHIPMUNK_TMP_PATH)}'"