37 lines
836 B
Bash
37 lines
836 B
Bash
#/!bin/bash
|
|
|
|
echo .................
|
|
echo . Prebuild step .
|
|
echo .................
|
|
|
|
|
|
version=$(git describe)
|
|
|
|
# (
|
|
# echo namespace GenericBridge
|
|
# echo {
|
|
# echo public class VersionInfo
|
|
# echo {
|
|
# echo public string Version{ get; set; } = "%VersionGIT%";
|
|
# echo }
|
|
# echo }
|
|
# )> "$(ProjectDir)\Properties\VersionInfo.cs"
|
|
|
|
[ -f ../../Properties/VersionInfo.cs ] && rm ../../Properties/VersionInfo.cs
|
|
cat > ../../Properties/VersionInfo.cs << ENDOFFILE
|
|
|
|
// Generated on $(date) by prebuild script
|
|
namespace GenericBridge
|
|
{
|
|
public class VersionInfo
|
|
{
|
|
public string Version{ get; set; } = "$version";
|
|
}
|
|
}
|
|
|
|
ENDOFFILE
|
|
|
|
echo Generated 'Properties/VersionInfo.cs' with the content below:
|
|
cat ../../Properties/VersionInfo.cs
|
|
echo ............................
|
|
#read -p 'Press Enter to continue...' var |