Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
89c2dc04
提交
89c2dc04
authored
7月 16, 2019
作者:
Andrey Volk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-11513: [Build-System] Fix Windows versioning.
上级
abec4dea
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
19 行增加
和
6 行删除
+19
-6
FullVersion.cmd
w32/Setup/FullVersion.cmd
+2
-1
Setup.2017.wixproj
w32/Setup/Setup.2017.wixproj
+9
-2
switch_version.props
w32/switch_version.props
+8
-3
没有找到文件。
w32/Setup/FullVersion.cmd
浏览文件 @
89c2dc04
...
...
@@ -5,5 +5,6 @@ FOR /f "delims=" %%i in ('FIND /N "AC_INIT" ..\..\configure.ac') DO SET version_
FOR /f "tokens=2 delims=," %%a in ("%version_contained_string%") DO SET dirty_version=%%a
SET almost_clean_version=%dirty_version:[=%
SET version_with_spaces=%almost_clean_version:]=%
SET full_version=%version_with_spaces: =%
SET version_with_dash=%version_with_spaces: =%
FOR /f "tokens=1 delims=-" %%a in ("%version_with_dash%") DO SET full_version=%%a
echo %full_version%
\ No newline at end of file
w32/Setup/Setup.2017.wixproj
浏览文件 @
89c2dc04
...
...
@@ -926,7 +926,10 @@
<Exec
Command=
"$(SolutionDir)w32\Setup\FullVersion.cmd"
ConsoleToMSBuild=
"true"
>
<Output
TaskParameter=
"ConsoleOutput"
PropertyName=
"FullVersion"
/>
</Exec>
<CreateProperty
Condition=
"'$(GitCommits)' != '0'"
Value=
"-snapshot-$(GitCommit)-$([System.DateTime]::Now.ToString(yyyyMMddHHmmss))"
>
<CreateProperty
Condition=
"'$(Configuration)' == 'Debug'"
Value=
"-debug"
>
<Output
TaskParameter=
"Value"
PropertyName=
"DebugConfiguration"
/>
</CreateProperty>
<CreateProperty
Condition=
"'$(GitCommits)' != '0'"
Value=
"$(GitCommits)-$(GitCommit)-$([System.DateTime]::Now.ToString(yyyyMMddHHmmss))"
>
<Output
TaskParameter=
"Value"
PropertyName=
"SnapshotName"
/>
</CreateProperty>
<CreateProperty
Condition=
"'$(GitCommits)' != '0'"
Value=
".$(GitCommits)"
>
...
...
@@ -941,7 +944,10 @@
<CreateProperty
Condition=
"'$(Platform)'=='x64'"
Value=
"x64"
>
<Output
TaskParameter=
"Value"
PropertyName=
"UserFriendlyPlatform"
/>
</CreateProperty>
<CreateProperty
Condition=
"$(FullVersion) != ''"
Value=
"$(SolutionDir)$(UserFriendlyPlatform)\$(OutputName)-$(FullVersion)$(Revision)$(SnapshotName)-$(UserFriendlyPlatform)-$(Configuration).msi"
>
<CreateProperty
Condition=
"$(FullVersion) != '' AND '$(GitCommits)' != '0'"
Value=
"$(SolutionDir)$(UserFriendlyPlatform)\$(OutputName)-$(FullVersion)-Dev-$(SnapshotName)-$(UserFriendlyPlatform)$(DebugConfiguration).msi"
>
<Output
TaskParameter=
"Value"
PropertyName=
"DestinationFileName"
/>
</CreateProperty>
<CreateProperty
Condition=
"$(FullVersion) != '' AND '$(GitCommits)' == '0'"
Value=
"$(SolutionDir)$(UserFriendlyPlatform)\$(OutputName)-$(FullVersion)-Release-$(UserFriendlyPlatform)$(DebugConfiguration).msi"
>
<Output
TaskParameter=
"Value"
PropertyName=
"DestinationFileName"
/>
</CreateProperty>
<CreateProperty
Value=
"$(VCToolsRedistVersion)"
>
...
...
@@ -969,6 +975,7 @@
<Message
Importance=
"High"
Text=
"VSInstallDir: $(VSInstallDir)"
/>
<Message
Importance=
"High"
Text=
"SoundsDir: $(SoundsDir)"
/>
<Message
Importance=
"High"
Text=
"DefineConstants: $(DefineConstants)"
/>
<Message
Importance=
"High"
Text=
"DestinationFileName: $(DestinationFileName)"
/>
</Target>
<!--
To modify your build process, add your task inside one of the targets below.
...
...
w32/switch_version.props
浏览文件 @
89c2dc04
...
...
@@ -36,7 +36,7 @@ using Microsoft.Build.Framework;
"Parsing FreeSWITCH version.");
string ConfigureAC = File.ReadAllText(@"$(BaseDir)configure.ac");
string pattern = @"AC_SUBST\((SWITCH_VERSION_[A-Z_]+),.*\[(.
?
)\]\)";
string pattern = @"AC_SUBST\((SWITCH_VERSION_[A-Z_]+),.*\[(.
*
)\]\)";
Dictionary<string, string>
v = new Dictionary
<string
,
string
>
();
...
...
@@ -44,9 +44,14 @@ using Microsoft.Build.Framework;
v.Add("SWITCH_VERSION_YEAR", year);
foreach (Match m in Regex.Matches(ConfigureAC, pattern)) {
v.Add(m.Groups[1].Value.Trim(), m.Groups[2].Value.Trim());
string value = m.Groups[2].Value.Trim();
if (value.Contains("-")) {
string[] tokens = value.Split('-');
value = tokens[0];
}
v.Add(m.Groups[1].Value.Trim(), value.Trim());
Log.LogMessage(MessageImportance.High,
m.Groups[1].Value + " = '" +
m.Groups[2].Value
+ "'");
m.Groups[1].Value + " = '" +
value.Trim()
+ "'");
}
//---------------------------------------------------------
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论