Skip to content

Commit 90ac5bd

Browse files
committed
build.sh: fixed git revision request
$project was initialized before GetBuildNumber, so function didn't work
1 parent 65ffb58 commit 90ac5bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function DebugPrint()
5555

5656
function SetupDefaultProject()
5757
{
58+
is_default_project=1
5859
project="UmodelTool/umodel"
5960
root="."
6061
render=1
@@ -99,7 +100,7 @@ function GetBuildNumber()
99100
[ -f "$version_file" ] && [ "$revision" ] && read last_revision < $version_file
100101
local last_revision=${last_revision##* } # cut "#define ..."
101102
# write back to a file if value differs or if file doesn't exist (only for UModel project, i.e. when $project is empty)
102-
[ -z "$project" ] && [ "$last_revision" != "$revision" ] && echo "#define GIT_REVISION $revision" > $version_file
103+
[ "$is_default_project" ] && [ "$last_revision" != "$revision" ] && echo "#define GIT_REVISION $revision" > $version_file
103104
}
104105

105106
#-------------------------------------------------------------

0 commit comments

Comments
 (0)