Browse Source
			
			
			Merge pull request #3651 from tessus/fix/branch-on-HEAD
			
				fix version when compiled at a specific commit
			
			
				pull/3659/head
			
			
		 
		
			
				
					
						 Daniel García
					
					2 years ago
						Daniel García
					
					2 years ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
1 additions and 
1 deletions
			 
			
		 
		
			
				- 
					
					
					 
					build.rs
				
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -72,7 +72,7 @@ fn version_from_git_info() -> Result<String, std::io::Error> { | 
			
		
	
		
		
			
				
					|  |  |     // Combined version
 |  |  |     // Combined version
 | 
			
		
	
		
		
			
				
					|  |  |     if let Some(exact) = exact_tag { |  |  |     if let Some(exact) = exact_tag { | 
			
		
	
		
		
			
				
					|  |  |         Ok(exact) |  |  |         Ok(exact) | 
			
		
	
		
		
			
				
					
					|  |  |     } else if &branch != "main" && &branch != "master" { |  |  |     } else if &branch != "main" && &branch != "master" && &branch != "HEAD" { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |         Ok(format!("{last_tag}-{rev_short} ({branch})")) |  |  |         Ok(format!("{last_tag}-{rev_short} ({branch})")) | 
			
		
	
		
		
			
				
					|  |  |     } else { |  |  |     } else { | 
			
		
	
		
		
			
				
					|  |  |         Ok(format!("{last_tag}-{rev_short}")) |  |  |         Ok(format!("{last_tag}-{rev_short}")) | 
			
		
	
	
		
		
			
				
					|  | 
 |