mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	build: Determine better-sqlite3 version automatically
This commit is contained in:
		
							parent
							
								
									6a7f95f75b
								
							
						
					
					
						commit
						946a02fd67
					
				| @ -1,7 +1,22 @@ | ||||
| #!/usr/bin/env bash | ||||
| ELECTRON_VERSION="electron-v125" | ||||
| NODE_VERSION="node-v115" | ||||
| BETTER_SQLITE3_VERSION=11.1.2 | ||||
| 
 | ||||
| if ! command -v jq &> /dev/null; then | ||||
|   echo "Missing command: jq" | ||||
|   exit 1 | ||||
| fi | ||||
| 
 | ||||
| script_dir=$(realpath $(dirname $0)) | ||||
| cd "$script_dir" | ||||
| BETTER_SQLITE3_VERSION=$(jq -r '.dependencies.["better-sqlite3"]' ../../package.json | grep -oP "\d+\.\d+\.\d+") | ||||
| 
 | ||||
| if [ -z $BETTER_SQLITE3_VERSION ]; then | ||||
|     echo "Unable to determine better-sqlite3 version." | ||||
|     exit 2 | ||||
| fi | ||||
| 
 | ||||
| echo "Version: $BETTER_SQLITE3_VERSION" | ||||
| 
 | ||||
| function download() { | ||||
|     version="$1" | ||||
| @ -16,9 +31,6 @@ function download() { | ||||
|     rm -f "$temp_file" | ||||
| } | ||||
| 
 | ||||
| script_dir=$(realpath $(dirname $0)) | ||||
| cd "$script_dir" | ||||
| 
 | ||||
| download $NODE_VERSION "linux-x64" "linux-server" | ||||
| download $ELECTRON_VERSION "linux-x64" "linux-desktop" | ||||
| download $ELECTRON_VERSION "win32-x64" "win" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran