mirror of
				https://github.com/Laupetin/OpenAssetTools.git
				synced 2025-10-30 18:17:15 +00:00 
			
		
		
		
	chore: make version be added via premake option
This commit is contained in:
		| @@ -1,3 +1,9 @@ | ||||
| newoption { | ||||
|     trigger = "oat-version", | ||||
|     description = "Set the OAT version being compiled.", | ||||
|     value = "VERSION", | ||||
|     default = "_" -- An empty string is not recognized as a default | ||||
| } | ||||
| newoption { | ||||
|     trigger = "debug-structureddatadef", | ||||
|     description = "Activate additional debugging logic for StructuredDataDef assets" | ||||
|   | ||||
| @@ -2,13 +2,17 @@ local BuildSubFolderFolder = "premake" | ||||
| local HeaderFileName = "GitVersion.h" | ||||
|  | ||||
| function GetGitVersion() | ||||
|     if _OPTIONS["oat-version"] ~= "_" then | ||||
|         return _OPTIONS["oat-version"] | ||||
|     end | ||||
|  | ||||
|     result, errorCode = os.outputof("git describe --tags") | ||||
|  | ||||
|     if errorCode == 0 then | ||||
|         return result | ||||
|     end | ||||
|  | ||||
|     return "Unknown" | ||||
|     return "dev" | ||||
| end | ||||
|  | ||||
| function GetVersionHeaderFolder() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user