File tree Expand file tree Collapse file tree 4 files changed +36
-2
lines changed
Expand file tree Collapse file tree 4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -186,4 +186,7 @@ FakesAssemblies/
186186# LightSwitch generated files
187187GeneratedArtifacts /
188188_Pvt_Extensions /
189- ModelManifest.xml
189+ ModelManifest.xml
190+
191+ # Xlfdll
192+ BuildInfo.cs
Original file line number Diff line number Diff line change 5353 <Reference Include =" System.Xml" />
5454 </ItemGroup >
5555 <ItemGroup >
56+ <Compile Include =" ..\BuildInfo.cs" >
57+ <Link >BuildInfo.cs</Link >
58+ </Compile >
5659 <Compile Include =" Program.cs" />
5760 <Compile Include =" Properties\AssemblyInfo.cs" />
5861 <Compile Include =" Helper.cs" />
Original file line number Diff line number Diff line change 11using System . Reflection ;
22using System . Runtime . InteropServices ;
33
4+ using Xlfdll ;
5+
46// 有关程序集的常规信息通过以下
57// 特性集控制。更改这些特性值可修改
68// 与程序集关联的信息。
3133// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
3234// 方法是按如下所示使用“*”:
3335// [assembly: AssemblyVersion("1.0.*")]
34- [ assembly: AssemblyVersion ( "1.0.*" ) ]
36+ [ assembly: AssemblyVersion ( "1.0." + BuildInfo . Build ) ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # version=`cat version.txt`
4+ build=$[` git log --oneline | wc -l` ]
5+ builddate=` date +" %F" `
6+ buildtime=` date +" %T" `
7+ commithash=` git show -s --format=%H`
8+
9+ echo " Generating build $build ($builddate $buildtime )..."
10+
11+ echo " // Auto-generated build information code file" > BuildInfo.cs
12+ echo " // Xlfdll Workstation" >> BuildInfo.cs
13+ echo " " >> BuildInfo.cs
14+ echo " namespace Xlfdll" >> BuildInfo.cs
15+ echo " {" >> BuildInfo.cs
16+ echo " internal static class BuildInfo" >> BuildInfo.cs
17+ echo " {" >> BuildInfo.cs
18+ # echo " internal const string Version = \"$buildversion\";" >> BuildInfo.cs
19+ echo " internal const string Build = \" $build \" ;" >> BuildInfo.cs
20+ echo " internal const string BuildDate = \" $builddate \" ;" >> BuildInfo.cs
21+ echo " internal const string BuildTime = \" $buildtime \" ;" >> BuildInfo.cs
22+ echo " internal const string CommitHash = \" $commithash \" ;" >> BuildInfo.cs
23+ echo " }" >> BuildInfo.cs
24+ echo " }" >> BuildInfo.cs
25+
26+ echo " Done."
You can’t perform that action at this time.
0 commit comments