 76d38e832e
			
		
	
	
		76d38e832e
		
			
		
	
	
	
	
		
			
			* fbt: reproducible manifest builds, less rebuild on small updates; scripts: assets: using timestamp from commandline af available * fbt: added app import validation for launch_app & single app build targets * fbt: COMSTR for app imports validation * docs: minor fixes * docs: markdown fix * vscode: comments for RTOS startup Co-authored-by: あく <alleteam@gmail.com>
		
			
				
	
	
		
			31 lines
		
	
	
		
			704 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			704 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import subprocess
 | |
| import datetime
 | |
| from functools import cache
 | |
| 
 | |
| 
 | |
| @cache
 | |
| def get_git_commit_unix_timestamp():
 | |
|     return int(subprocess.check_output(["git", "show", "-s", "--format=%ct"]))
 | |
| 
 | |
| 
 | |
| @cache
 | |
| def get_fast_git_version_id():
 | |
|     try:
 | |
|         version = (
 | |
|             subprocess.check_output(
 | |
|                 [
 | |
|                     "git",
 | |
|                     "describe",
 | |
|                     "--always",
 | |
|                     "--dirty",
 | |
|                     "--all",
 | |
|                     "--long",
 | |
|                 ]
 | |
|             )
 | |
|             .strip()
 | |
|             .decode()
 | |
|         )
 | |
|         return (version, datetime.date.today())
 | |
|     except Exception as e:
 | |
|         print("Failed to check for git changes", e)
 |