Browse Source

Fix dropped "dev-" prefix from version tag

In commit c3a31666, "dev-" prefix was dropped unintentionally. This commit fixes
that.
Hasan Yasin Ozturk 2 years ago
parent
commit
963eeee361
2 changed files with 2 additions and 2 deletions
  1. 1 1
      build.bat
  2. 1 1
      build_odin.sh

+ 1 - 1
build.bat

@@ -52,7 +52,7 @@ set compiler_defines= -DODIN_VERSION_RAW=\"%odin_version_raw%\"
 
 
 if not exist .git\ goto skip_git_hash
 if not exist .git\ goto skip_git_hash
 for /f "tokens=1,2" %%i IN ('git show "--pretty=%%cd %%h" "--date=format:%%Y-%%m" --no-patch --no-notes HEAD') do (
 for /f "tokens=1,2" %%i IN ('git show "--pretty=%%cd %%h" "--date=format:%%Y-%%m" --no-patch --no-notes HEAD') do (
-	set odin_version_raw=%%i
+	set odin_version_raw=dev-%%i
 	set GIT_SHA=%%j
 	set GIT_SHA=%%j
 )
 )
 if %ERRORLEVEL% equ 0 set compiler_defines=%compiler_defines% -DGIT_SHA=\"%GIT_SHA%\"
 if %ERRORLEVEL% equ 0 set compiler_defines=%compiler_defines% -DGIT_SHA=\"%GIT_SHA%\"

+ 1 - 1
build_odin.sh

@@ -14,7 +14,7 @@ LDFLAGS="$LDFLAGS -pthread -lm -lstdc++"
 if [ -d ".git" ] && [ $(which git) ]; then
 if [ -d ".git" ] && [ $(which git) ]; then
 	versionTag=( $(git show --pretty='%cd %h' --date=format:%Y-%m --no-patch --no-notes HEAD) )
 	versionTag=( $(git show --pretty='%cd %h' --date=format:%Y-%m --no-patch --no-notes HEAD) )
 	if [ $? -eq 0 ]; then
 	if [ $? -eq 0 ]; then
-		ODIN_VERSION="${versionTag[0]}"
+		ODIN_VERSION="dev-${versionTag[0]}"
 		GIT_SHA="${versionTag[1]}"
 		GIT_SHA="${versionTag[1]}"
 		CPPFLAGS="$CPPFLAGS -DGIT_SHA=\"$GIT_SHA\""
 		CPPFLAGS="$CPPFLAGS -DGIT_SHA=\"$GIT_SHA\""
 	fi
 	fi