mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-12 11:37:27 +00:00
chore: make version be added via premake option
This commit is contained in:
5
.github/workflows/release.yaml
vendored
5
.github/workflows/release.yaml
vendored
@@ -26,13 +26,12 @@ jobs:
|
|||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Premake generate
|
- name: Premake generate
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
env:
|
env:
|
||||||
PREMAKE_NO_PROMPT: 1
|
PREMAKE_NO_PROMPT: 1
|
||||||
run: ./generate.sh
|
run: ./generate.sh --oat-version=${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
@@ -62,7 +61,7 @@ jobs:
|
|||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
env:
|
env:
|
||||||
PREMAKE_NO_PROMPT: 1
|
PREMAKE_NO_PROMPT: 1
|
||||||
run: ./generate.bat
|
run: ./generate.bat --oat-version=${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
|
@@ -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 {
|
newoption {
|
||||||
trigger = "debug-structureddatadef",
|
trigger = "debug-structureddatadef",
|
||||||
description = "Activate additional debugging logic for StructuredDataDef assets"
|
description = "Activate additional debugging logic for StructuredDataDef assets"
|
||||||
|
@@ -2,13 +2,17 @@ local BuildSubFolderFolder = "premake"
|
|||||||
local HeaderFileName = "GitVersion.h"
|
local HeaderFileName = "GitVersion.h"
|
||||||
|
|
||||||
function GetGitVersion()
|
function GetGitVersion()
|
||||||
|
if _OPTIONS["oat-version"] ~= "_" then
|
||||||
|
return _OPTIONS["oat-version"]
|
||||||
|
end
|
||||||
|
|
||||||
result, errorCode = os.outputof("git describe --tags")
|
result, errorCode = os.outputof("git describe --tags")
|
||||||
|
|
||||||
if errorCode == 0 then
|
if errorCode == 0 then
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
return "Unknown"
|
return "dev"
|
||||||
end
|
end
|
||||||
|
|
||||||
function GetVersionHeaderFolder()
|
function GetVersionHeaderFolder()
|
||||||
|
Reference in New Issue
Block a user