Complete switch to git
This commit is contained in:
		
							parent
							
								
									7192253626
								
							
						
					
					
						commit
						28b4932b86
					
				
							
								
								
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,2 +1,8 @@ | ||||
| # Build output | ||||
| /build | ||||
| /extension/version_auto.h | ||||
| 
 | ||||
| # Breakpad stuff, it apparently has to be called src | ||||
| /src | ||||
| /.gclient | ||||
| /.gclient_entries | ||||
|  | ||||
							
								
								
									
										25
									
								
								.travis.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								.travis.yml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | ||||
| sudo: false | ||||
| language: cpp | ||||
| addons: | ||||
|   apt: | ||||
|     packages: | ||||
|       - g++-multilib | ||||
| compiler: | ||||
|   - clang | ||||
| before_script: | ||||
|   - cd .. | ||||
|   - git clone --depth=1 --branch=master https://chromium.googlesource.com/chromium/tools/depot_tools.git | ||||
|   - git clone --depth=1 --branch=1.7-dev https://github.com/alliedmodders/sourcemod sourcemod-1.5 | ||||
|   - git clone --depth=1 --branch=master https://github.com/alliedmodders/ambuild | ||||
|   - cd ambuild | ||||
|   - python setup.py install --user | ||||
|   - cd $TRAVIS_BUILD_DIR | ||||
|   - git fetch --unshallow | ||||
|   - ../depot_tools/fetch breakpad | ||||
| script: | ||||
|   - mkdir build | ||||
|   - cd build | ||||
|   - python ../configure.py --enable-optimize | ||||
|   - python ./build.py | ||||
| after_success: | ||||
|   - python ../upload.py | ||||
| @ -1,9 +1,13 @@ | ||||
| # vim: set ts=2 sw=2 tw=99 noet ft=python:  | ||||
| import os | ||||
| import urllib.request | ||||
| from ambuild.command import Command | ||||
| from ambuild.command import ShellCommand | ||||
| 
 | ||||
| try: | ||||
| 	import urllib.request as urllib | ||||
| except ImportError: | ||||
| 	import urllib2 as urllib | ||||
| 
 | ||||
| class IterateDebugInfoCommand(Command): | ||||
| 	def run(self, master, job): | ||||
| 		pdblog = open(os.path.join(AMBuild.outputFolder, 'pdblog.txt'), 'rt') | ||||
|  | ||||
| @ -7,12 +7,13 @@ import ambuild.command as command | ||||
| 
 | ||||
| #Quickly try to ascertain the current repository revision | ||||
| def GetVersion(): | ||||
| 	args = ['hg', 'parent', '-R', AMBuild.sourceFolder] | ||||
| 	p = command.RunDirectCommand(AMBuild, args) | ||||
| 	m = re.match('changeset:\s+(\d+):(.+)', p.stdoutText) | ||||
| 	if m == None: | ||||
| 	rev = command.RunDirectCommand(AMBuild, ['git', 'rev-list', '--count', 'HEAD']).stdoutText.strip() | ||||
| 	cset = command.RunDirectCommand(AMBuild, ['git', 'log', '--pretty=format:%h', '-n', '1']).stdoutText.strip() | ||||
| 
 | ||||
| 	if not rev or not cset: | ||||
| 		raise Exception('Could not determine repository version') | ||||
| 	return m.groups() | ||||
| 
 | ||||
| 	return (rev, cset) | ||||
| 
 | ||||
| def PerformReversioning(): | ||||
| 	rev, cset = GetVersion() | ||||
|  | ||||
| @ -1 +0,0 @@ | ||||
| Lemons. | ||||
| @ -13,24 +13,24 @@ def BuildEverything(): | ||||
| 	BuildExtension(); | ||||
| 
 | ||||
| def BuildBreakpad(): | ||||
| 	breakpad = AMBuild.AddJob('google-breakpad') | ||||
| 	breakpad = AMBuild.AddJob('breakpad') | ||||
| 
 | ||||
| 	if AMBuild.target['platform'] in ['linux']: | ||||
| 		if osutil.FileExists(os.path.join(AMBuild.outputFolder, 'google-breakpad', 'src', 'client', 'linux', 'libbreakpad_client.a')): | ||||
| 		if osutil.FileExists(os.path.join(AMBuild.outputFolder, 'src', 'src', 'client', 'linux', 'libbreakpad_client.a')): | ||||
| 			return | ||||
| 
 | ||||
| 		breakpad.AddCommand(ShellCommand('CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ' + os.path.join(AMBuild.sourceFolder, 'google-breakpad', 'configure'))) | ||||
| 		breakpad.AddCommand(ShellCommand('CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ' + os.path.join(AMBuild.sourceFolder, 'src', 'configure'))) | ||||
| 		breakpad.AddCommand(ShellCommand('make src/client/linux/libbreakpad_client.a')) | ||||
| 		 | ||||
| 	elif AMBuild.target['platform'] in ['windows']: | ||||
| 		if osutil.FileExists(os.path.join(AMBuild.sourceFolder, 'google-breakpad', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'exception_handler.lib')): | ||||
| 		if osutil.FileExists(os.path.join(AMBuild.sourceFolder, 'src', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'exception_handler.lib')): | ||||
| 			return | ||||
| 		 | ||||
| 		gyp = os.path.join(AMBuild.sourceFolder, 'google-breakpad', 'src', 'tools', 'gyp', 'gyp.bat') | ||||
| 		gyppath = os.path.join(AMBuild.sourceFolder, 'google-breakpad', 'src', 'client', 'windows', 'handler', 'exception_handler.gyp') | ||||
| 		gyp = os.path.join(AMBuild.sourceFolder, 'src', 'src', 'tools', 'gyp', 'gyp.bat') | ||||
| 		gyppath = os.path.join(AMBuild.sourceFolder, 'src', 'src', 'client', 'windows', 'handler', 'exception_handler.gyp') | ||||
| 		breakpad.AddCommand(DirectCommand([gyp, gyppath])) | ||||
| 		 | ||||
| 		slnpath = os.path.join(AMBuild.sourceFolder, 'google-breakpad', 'src', 'client', 'windows', 'handler', 'exception_handler.sln') | ||||
| 		slnpath = os.path.join(AMBuild.sourceFolder, 'src', 'src', 'client', 'windows', 'handler', 'exception_handler.sln') | ||||
| 		breakpad.AddCommand(DirectCommand(['msbuild', slnpath, '/p:Configuration=Release'])) | ||||
| 
 | ||||
| def BuildExtension(): | ||||
| @ -43,7 +43,7 @@ def BuildExtension(): | ||||
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD15'], 'public', 'extensions')) | ||||
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD15'], 'public', 'sourcepawn')) | ||||
| 
 | ||||
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'google-breakpad', 'src')) | ||||
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'src', 'src')) | ||||
| 
 | ||||
| 	if AMBuild.target['platform'] in ['linux']: | ||||
| 		compiler['POSTLINKFLAGS'].append('-lstdc++') | ||||
| @ -61,7 +61,7 @@ def BuildExtension(): | ||||
| 
 | ||||
| 	if AMBuild.target['platform'] in ['linux']: | ||||
| 		link = os.path.join(AMBuild.outputFolder, extension.workFolder, 'libbreakpad_client.a') | ||||
| 		target = os.path.join(AMBuild.outputFolder, 'google-breakpad', 'src', 'client', 'linux', 'libbreakpad_client.a') | ||||
| 		target = os.path.join(AMBuild.outputFolder, 'breakpad', 'src', 'client', 'linux', 'libbreakpad_client.a') | ||||
| 		try: | ||||
| 			os.lstat(link) | ||||
| 		except: | ||||
| @ -71,7 +71,7 @@ def BuildExtension(): | ||||
| 	elif AMBuild.target['platform'] in ['windows']: | ||||
| 		libs = ['exception_handler', 'common', 'crash_generation_client'] | ||||
| 		for lib in libs: | ||||
| 			path = os.path.join(AMBuild.sourceFolder, 'google-breakpad', 'src', 'client', 'windows', 'handler', 'Release', 'lib', lib + '.lib') | ||||
| 			path = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'client', 'windows', 'handler', 'Release', 'lib', lib + '.lib') | ||||
| 			if os.path.isfile(path): | ||||
| 				binary.RelinkIfNewer(path) | ||||
| 			binary['POSTLINKFLAGS'].extend([path]) | ||||
|  | ||||
| @ -1 +1 @@ | ||||
| 2.0.1 | ||||
| 2.1.0 | ||||
|  | ||||
							
								
								
									
										25
									
								
								upload.py
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								upload.py
									
									
									
									
									
								
							| @ -12,26 +12,19 @@ elif sys.platform.startswith('win32'): | ||||
| elif sys.platform.startswith('darwin'): | ||||
| 	platform = 'mac' | ||||
| 
 | ||||
| def HGVersion(): | ||||
| 	p = subprocess.Popen(['hg', 'identify',  '-n'], stdout = subprocess.PIPE, stderr = subprocess.PIPE) | ||||
| def GITHash(): | ||||
| 	p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'], stdout = subprocess.PIPE, stderr = subprocess.PIPE) | ||||
| 	(stdout, stderr) = p.communicate() | ||||
| 	stdout = stdout.decode('UTF-8') | ||||
| 	return stdout.rstrip('\r\n') | ||||
| 
 | ||||
| 	return stdout.rstrip('+\r\n') | ||||
| def GITVersion(): | ||||
| 	p = subprocess.Popen(['git', 'rev-list', '--count', '--first-parent', 'HEAD'], stdout = subprocess.PIPE, stderr = subprocess.PIPE) | ||||
| 	(stdout, stderr) = p.communicate() | ||||
| 	stdout = stdout.decode('UTF-8') | ||||
| 	return stdout.rstrip('\r\n') | ||||
| 
 | ||||
| def ReleaseVersion(): | ||||
| 	productFile = open('product.version', 'r') | ||||
| 	productContents = productFile.read() | ||||
| 	productFile.close() | ||||
| 
 | ||||
| 	m = re.match('(\d+)\.(\d+)\.(\d+)(.*)', productContents) | ||||
| 	if m == None: | ||||
| 		raise Exception('Could not detremine product version') | ||||
| 	 | ||||
| 	major, minor, release, tag = m.groups() | ||||
| 	return '.'.join([major, minor, release]) | ||||
| 
 | ||||
| filename = '-'.join([os.environ.get('project', 'accelerator'), ReleaseVersion(), 'hg' + HGVersion(), platform]) | ||||
| filename = '-'.join(['accelerator', 'git' + GITVersion(), GITHash(), platform]) | ||||
| 
 | ||||
| debug_build = os.environ.get('is_debug_build', False) == "1" | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user