You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Desktop: Seamless-Updates: added latest-mac-arm64.yml (#10941)
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/workflows/build-macos-m1.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build-macos-m1.yml
									
									
									
									
										vendored
									
									
								
							| @@ -83,4 +83,4 @@ jobs: | ||||
|             npm pkg set 'build.mac.identity'=null --json | ||||
|  | ||||
|             PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn dist  --mac --arm64 --publish=never | ||||
|           fi | ||||
|           fi | ||||
| @@ -2,13 +2,14 @@ const fs = require('fs'); | ||||
| const path = require('path'); | ||||
| const os = require('os'); | ||||
| const sha512 = require('js-sha512'); | ||||
| const distDirName = 'dist'; | ||||
| const distPath = path.join(__dirname, distDirName); | ||||
| 
 | ||||
| const generateChecksumFile = () => { | ||||
| 	if (os.platform() !== 'linux') { | ||||
| 		return []; // SHA-512 is only for AppImage
 | ||||
| 	} | ||||
| 	const distDirName = 'dist'; | ||||
| 	const distPath = path.join(__dirname, distDirName); | ||||
| 
 | ||||
| 	let appImageName = ''; | ||||
| 	const files = fs.readdirSync(distPath); | ||||
| 	for (const key in files) { | ||||
| @@ -30,4 +31,8 @@ const generateChecksumFile = () => { | ||||
| 	return [sha512FilePath]; | ||||
| }; | ||||
| 
 | ||||
| exports.default = generateChecksumFile; | ||||
| const mainHook = () => { | ||||
| 	generateChecksumFile(); | ||||
| }; | ||||
| 
 | ||||
| exports.default = mainHook; | ||||
							
								
								
									
										25
									
								
								packages/app-desktop/artifactBuildCompleted.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								packages/app-desktop/artifactBuildCompleted.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| const fs = require('fs'); | ||||
| const path = require('path'); | ||||
| const os = require('os'); | ||||
| const distDirName = 'dist'; | ||||
| const distPath = path.join(__dirname, distDirName); | ||||
|  | ||||
| const renameLatestYmlFile = () => { | ||||
| 	if (os.platform() === 'darwin' && process.arch === 'arm64') { | ||||
| 		const latestMacFilePath = path.join(distPath, 'latest-mac.yml'); | ||||
| 		const renamedMacFilePath = path.join(distPath, 'latest-mac-arm64.yml'); | ||||
|  | ||||
| 		if (fs.existsSync(latestMacFilePath)) { | ||||
| 			fs.renameSync(latestMacFilePath, renamedMacFilePath); | ||||
| 			return [renamedMacFilePath]; | ||||
| 		} else { | ||||
| 			throw new Error('latest-mac.yml not found!'); | ||||
| 		} | ||||
| 	} | ||||
| }; | ||||
|  | ||||
| const mainHook = () => { | ||||
| 	renameLatestYmlFile(); | ||||
| }; | ||||
|  | ||||
| exports.default = mainHook; | ||||
| @@ -41,7 +41,7 @@ | ||||
|       "build/tesseract.js-core/**", | ||||
|       "build/7zip/**" | ||||
|     ], | ||||
|     "afterAllArtifactBuild": "./generateSha512.js", | ||||
|     "afterAllArtifactBuild": "./afterAllArtifactBuild.js", | ||||
|     "asar": true, | ||||
|     "asarUnpack": "./node_modules/node-notifier/vendor/**", | ||||
|     "win": { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user