You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Desktop: remove branch name in detached head state (#4636)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							6496172aed
						
					
				
				
					commit
					3e9cb1d4fd
				
			| @@ -27,8 +27,7 @@ module.exports = async function() { | ||||
| 		// Use stdio: 'pipe' so that execSync doesn't print error directly to stdout | ||||
| 		branch = execSync('git rev-parse --abbrev-ref HEAD', { stdio: 'pipe' }).toString().trim(); | ||||
| 		hash = execSync('git log --pretty="%h" -1', { stdio: 'pipe' }).toString().trim(); | ||||
| 		// The builds in CI are done from a 'detached HEAD' state | ||||
| 		if (branch === 'HEAD') branch = 'master'; | ||||
| 		// The builds in CI are done from a 'detached HEAD' state, thus the branch name will be 'HEAD' for Travis builds. | ||||
| 	} catch (err) { | ||||
| 		// Don't display error object as it's a "fatal" error, but | ||||
| 		// not for us, since is it not critical information | ||||
|   | ||||
| @@ -7,6 +7,7 @@ export default function versionInfo(packageInfo: any) { | ||||
| 	let gitInfo = ''; | ||||
| 	if ('git' in p) { | ||||
| 		gitInfo = _('Revision: %s (%s)', p.git.hash, p.git.branch); | ||||
| 		if (p.git.branch === 'HEAD') gitInfo = gitInfo.slice(0, -7); | ||||
| 	} | ||||
| 	const copyrightText = 'Copyright © 2016-YYYY Laurent Cozic'; | ||||
| 	const now = new Date(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user