2024-02-22 16:43:59 +00:00
|
|
|
#/!bin/bash
|
|
|
|
|
|
|
|
echo .................
|
2024-03-14 10:43:50 +00:00
|
|
|
echo . Prebuild step $(pwd)
|
2024-02-22 16:43:59 +00:00
|
|
|
echo .................
|
|
|
|
|
|
|
|
|
|
|
|
version=$(git describe)
|
|
|
|
|
|
|
|
# (
|
2024-03-14 10:43:50 +00:00
|
|
|
# echo namespace SafeDispatch-git
|
2024-02-22 16:43:59 +00:00
|
|
|
# echo {
|
|
|
|
# echo public class VersionInfo
|
|
|
|
# echo {
|
|
|
|
# echo public string Version{ get; set; } = "%VersionGIT%";
|
|
|
|
# echo }
|
|
|
|
# echo }
|
|
|
|
# )> "$(ProjectDir)\Properties\VersionInfo.cs"
|
|
|
|
|
2024-03-14 10:43:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
[ -f ../../../Properties/VersionInfo.cs ] && rm ../../../Properties/VersionInfo.cs
|
|
|
|
cat > ../../../Properties/VersionInfo.cs << ENDOFFILE
|
2024-02-22 16:43:59 +00:00
|
|
|
|
|
|
|
// Generated on $(date) by prebuild script
|
2024-03-14 10:43:50 +00:00
|
|
|
namespace SafeDispatch-git
|
2024-02-22 16:43:59 +00:00
|
|
|
{
|
|
|
|
public class VersionInfo
|
|
|
|
{
|
|
|
|
public string Version{ get; set; } = "$version";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ENDOFFILE
|
|
|
|
|
|
|
|
echo Generated 'Properties/VersionInfo.cs' with the content below:
|
2024-03-14 10:43:50 +00:00
|
|
|
cat ../../../Properties/VersionInfo.cs
|
2024-02-22 16:43:59 +00:00
|
|
|
echo ............................
|
2024-02-28 15:44:25 +00:00
|
|
|
#read -p 'Press Enter to continue...' var
|