| 
									
										
										
										
											2019-11-18 18:18:28 -08:00
										 |  |  | #!/bin/bash
 | 
					
						
							|  |  |  | set -e | 
					
						
							|  |  |  | set +x | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-19 16:08:27 -08:00
										 |  |  | trap "cd $(pwd -P)" EXIT | 
					
						
							| 
									
										
										
										
											2019-11-19 16:58:09 -08:00
										 |  |  | cd "$(dirname $0)" | 
					
						
							|  |  |  | cd "checkout" | 
					
						
							| 
									
										
										
										
											2019-11-18 18:18:28 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-21 17:06:57 -08:00
										 |  |  | BUILD_BRANCH="playwright-build" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if ! [[ $(git rev-parse --abbrev-ref HEAD) == "$BUILD_BRANCH" ]]; then | 
					
						
							|  |  |  |   echo "ERROR: Cannot build any branch other than $BUILD_BRANCH" | 
					
						
							| 
									
										
										
										
											2019-11-18 18:18:28 -08:00
										 |  |  |   exit 1; | 
					
						
							|  |  |  | else | 
					
						
							| 
									
										
										
										
											2019-11-21 17:06:57 -08:00
										 |  |  |   echo "-- checking git branch is $BUILD_BRANCH - OK" | 
					
						
							| 
									
										
										
										
											2019-11-18 18:18:28 -08:00
										 |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [[ "$(uname)" == "Darwin" ]]; then | 
					
						
							|  |  |  |   ./Tools/Scripts/build-webkit --release | 
					
						
							|  |  |  | elif [[ "$(uname)" == "Linux" ]]; then | 
					
						
							| 
									
										
										
										
											2019-11-22 22:39:13 -08:00
										 |  |  |   # Check that WebKitBuild exists and is not empty. | 
					
						
							|  |  |  |   if ! [[ (-d ./WebKitBuild) && (-n $(ls -1 ./WebKitBuild/)) ]]; then | 
					
						
							| 
									
										
										
										
											2019-11-22 22:24:14 -08:00
										 |  |  |     yes | DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitgtk-libs | 
					
						
							|  |  |  |   fi | 
					
						
							| 
									
										
										
										
											2019-11-18 18:18:28 -08:00
										 |  |  |   ./Tools/Scripts/build-webkit --gtk --release MiniBrowser | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  |   echo "ERROR: cannot upload on this platform!" 1>&2 | 
					
						
							|  |  |  |   exit 1; | 
					
						
							|  |  |  | fi |