| 
									
										
										
										
											2018-12-02 00:26:45 +01:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | BUILD_DIR=./dist/trilium-linux-x64 | 
					
						
							|  |  |  | rm -rf $BUILD_DIR | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-12 19:48:45 +01:00
										 |  |  | rm -r node_modules/sqlite3/lib/binding/* | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cp -r bin/deps/linux-x64/sqlite/* node_modules/sqlite3/lib/binding/ | 
					
						
							| 
									
										
										
										
											2018-12-02 00:26:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-12 00:05:13 +01:00
										 |  |  | ./node_modules/.bin/electron-packager . --asar --out=dist --executable-name=trilium --platform=linux --arch=x64 --overwrite | 
					
						
							| 
									
										
										
										
											2018-12-02 00:26:45 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-30 09:39:58 +01:00
										 |  |  | cp images/app-icons/png/128x128.png $BUILD_DIR/icon.png | 
					
						
							| 
									
										
										
										
											2019-01-22 19:49:33 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-02 00:26:45 +01:00
										 |  |  | # removing software WebGL binaries because they are pretty huge and not necessary | 
					
						
							|  |  |  | rm -r $BUILD_DIR/swiftshader | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo "Packaging linux x64 electron distribution..." | 
					
						
							|  |  |  | VERSION=`jq -r ".version" package.json` | 
					
						
							| 
									
										
										
										
											2019-01-12 19:48:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-16 23:57:09 +01:00
										 |  |  | cd dist | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | tar cJf trilium-linux-x64-${VERSION}.tar.xz trilium-linux-x64 |