| 
									
										
										
										
											2017-12-25 15:01:33 -05:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							| 
									
										
										
										
											2017-11-05 17:58:55 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-22 21:33:07 +03:00
										 |  |  | set -e  # Fail on any command error | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-14 21:35:08 +03:00
										 |  |  | if ! command -v jq &> /dev/null; then | 
					
						
							|  |  |  |   echo "Missing command: jq" | 
					
						
							|  |  |  |   exit 1 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if ! command -v fakeroot &> /dev/null; then | 
					
						
							|  |  |  |   echo "Missing command: fakeroot" | 
					
						
							|  |  |  |   exit 1 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if ! command -v dpkg-deb &> /dev/null; then | 
					
						
							|  |  |  |   echo "Missing command: dpkg-deb" | 
					
						
							|  |  |  |   exit 1 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-14 21:45:48 +03:00
										 |  |  | if dpkg-deb 2>&1 | grep BusyBox &> /dev/null; then | 
					
						
							|  |  |  |   echo "The dpkg-deb binary provided by BusyBox is not compatible. The Debian tool needs to be used instead." | 
					
						
							|  |  |  |   exit 1 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-14 21:35:08 +03:00
										 |  |  | if ! command -v wine &> /dev/null; then | 
					
						
							|  |  |  |   echo "Missing command: wine" | 
					
						
							|  |  |  |   exit 1 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-08 23:34:54 -05:00
										 |  |  | echo "Deleting existing builds" | 
					
						
							| 
									
										
										
										
											2017-11-08 20:48:48 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-21 22:56:43 +02:00
										 |  |  | rm -rf dist/* | 
					
						
							| 
									
										
										
										
											2017-11-05 18:31:22 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-11 21:22:59 +02:00
										 |  |  | SRC_DIR=dist/trilium-src | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | bin/copy-trilium.sh $SRC_DIR | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # we'll just copy the same SRC dir to all the builds so we don't have to do npm install in each separately | 
					
						
							|  |  |  | cp -r $SRC_DIR ./dist/trilium-linux-x64-src | 
					
						
							| 
									
										
										
										
											2019-10-15 20:32:43 +02:00
										 |  |  | cp -r $SRC_DIR ./dist/trilium-linux-x64-server | 
					
						
							| 
									
										
										
										
											2019-10-11 21:22:59 +02:00
										 |  |  | cp -r $SRC_DIR ./dist/trilium-windows-x64-src | 
					
						
							|  |  |  | cp -r $SRC_DIR ./dist/trilium-mac-x64-src | 
					
						
							| 
									
										
										
										
											2024-05-18 03:34:24 -05:00
										 |  |  | cp -r $SRC_DIR ./dist/trilium-mac-arm64-src | 
					
						
							| 
									
										
										
										
											2017-12-27 17:39:41 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-11 21:22:59 +02:00
										 |  |  | bin/build-win-x64.sh DONTCOPY | 
					
						
							| 
									
										
										
										
											2018-11-19 17:16:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-11 21:22:59 +02:00
										 |  |  | bin/build-mac-x64.sh DONTCOPY | 
					
						
							| 
									
										
										
										
											2018-12-02 08:42:11 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-18 03:34:24 -05:00
										 |  |  | bin/build-mac-arm64.sh DONTCOPY | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-11 21:22:59 +02:00
										 |  |  | bin/build-linux-x64.sh DONTCOPY | 
					
						
							| 
									
										
										
										
											2019-02-20 21:58:23 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-11 21:22:59 +02:00
										 |  |  | bin/build-server.sh DONTCOPY |