Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix sha1 on premake linux
- Loading branch information
Showing
with
3 additions
and
5 deletions.
-
+1
−1
premake5.lua
-
+2
−4
printHash.sh
There are no files selected for viewing
|
|
@@ -331,7 +331,7 @@ project "re3" |
|
prebuildcommands { '"%{prj.location}..\\printHash.bat" "%{prj.location}..\\src\\extras\\GitSHA1.cpp"' }
|
|
prebuildcommands { '"%{prj.location}..\\printHash.bat" "%{prj.location}..\\src\\extras\\GitSHA1.cpp"' }
|
|
|
|
|
|
filter "platforms:not win*"
|
|
filter "platforms:not win*"
|
|
prebuildcommands { '"%{prj.location}../printHash.sh" "%{prj.location}../src/extras/GitSHA1.cpp"' }
|
|
prebuildcommands { '"%{prj.location}/../printHash.sh" "%{prj.location}/../src/extras/GitSHA1.cpp"' }
|
|
|
|
|
|
filter "platforms:win*glfw*"
|
|
filter "platforms:win*glfw*"
|
|
staticruntime "off"
|
|
staticruntime "off"
|
|
|
|
|
@@ -1,12 +1,10 @@ |
|
#!/usr/bin/bash
|
|
#!/bin/bash
|
|
|
|
|
|
> $1
|
|
> $1
|
|
|
|
|
|
echo -n "#define GIT_SHA1 \"" > $1
|
|
echo -n "#define GIT_SHA1 \"" > $1
|
|
|
|
|
|
git --version 2>&1 >/dev/null
|
|
if (command -v "git" >/dev/null) then
|
|
GIT_IS_AVAILABLE=$?
|
|
|
|
if [ $GIT_IS_AVAILABLE -ne 0 ]; then
|
|
|
|
git rev-parse --short HEAD | tr -d '\n' >> $1
|
|
git rev-parse --short HEAD | tr -d '\n' >> $1
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|