Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added build target to convert release notes to HTML #177

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ build/SIL.BuildTasks.*
lib/dotnet/NAudio.dll
IMDI_3_0_Fix.py
icu4c.readme.txt
/src/Installer/output/wixobj
1 change: 1 addition & 0 deletions DistFiles/FFmpeg/.guidsForInstaller.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<!--This file is generated and then updated by an MSBuild task. It preserves the automatically-generated guids assigned files that will be installed on user machines. So it should be held in source control.-->
<InstallerMetadata>
<File Id="ProgramDir.FFmpeg.ffmpeg.exe" Guid="7af85cb4-327c-42f2-85bf-f52eb2212d82" />
<File Id="ProgramDir.FFmpeg.ffprobe.exe" Guid="b93e726f-1db2-48db-bebc-b6b284344751" />
</InstallerMetadata>
21 changes: 15 additions & 6 deletions build/SayMore.proj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
<RootDir Condition="'$(teamcity_version)' != ''">$(teamcity_build_checkoutDir)</RootDir>
<BUILD_NUMBER Condition="'$(BUILD_NUMBER)'==''">3.5.0</BUILD_NUMBER>
<BuildTasksDll>$(RootDir)/packages/SIL.BuildTasks.2.5.0/tools/SIL.BuildTasks.dll</BuildTasksDll>
<Configuration>Release</Configuration>
<RestartBuild Condition="!Exists('$(BuildTasksDll)')">true</RestartBuild>
<RestartBuild Condition="Exists('$(BuildTasksDll)')">false</RestartBuild>
<SILReleaseTasksProps>$(RootDir)/packages/SIL.ReleaseTasks/build/SIL.ReleaseTasks.props</SILReleaseTasksProps>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<RestartBuild Condition="!Exists('$(BuildTasksDll)') Or !Exists('$(SILReleaseTasksProps)')">true</RestartBuild>
<RestartBuild Condition="Exists('$(BuildTasksDll)') And Exists('$(SILReleaseTasksProps)')">false</RestartBuild>
</PropertyGroup>

<UsingTask TaskName="StampAssemblies" AssemblyFile="$(BuildTasksDll)" Condition="Exists('$(BuildTasksDll)')" />
Expand Down Expand Up @@ -34,12 +35,14 @@
</Target>

<Import Project="../.nuget/NuGet.targets" />
<Import Project="$(SILReleaseTasksProps)" Condition="Exists('$(SILReleaseTasksProps)')" />

<Target Name="RestoreBuildTasks" DependsOnTargets="CheckPrerequisites">
<Target Name="RestoreLocalPackages" DependsOnTargets="CheckPrerequisites">
<Message Text="BuildTasksDll=$(BuildTasksDll)"/>
<Message Text="RestartBuild=$(RestartBuild)"/>
<Message Text="Configuration=$(Configuration)"/>
<Exec Command='$(NuGetCommand) install SIL.BuildTasks -version 2.1.0 -source "$(PackageSources)" -solutionDirectory "$(SolutionDir)."' />
<Exec Command='$(NuGetCommand) install SIL.ReleaseTasks -excludeVersion -PreRelease -source "$(PackageSources)" -solutionDirectory "$(SolutionDir)"' />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="BuildInternal"
Properties="Configuration=$(Configuration)" Condition="$(RestartBuild)" />
</Target>
Expand All @@ -62,14 +65,14 @@
</Target>

<Target Name="Build">
<CallTarget Targets="RestoreBuildTasks"/>
<CallTarget Targets="RestoreLocalPackages"/>
<CallTarget Targets="BuildInternal" Condition="!$(RestartBuild)" />
</Target>

<Target Name="BuildInternal" DependsOnTargets="SetAssemblyVersion;SetBuildType">
<MSBuild Projects="$(RootDir)/SayMore.sln"
Targets="Rebuild"
Properties="Configuration=Release" />
Properties="Configuration=$(Configuration)" />
<Message Text="Build Complete"/>
</Target>

Expand Down Expand Up @@ -120,6 +123,12 @@
ReplacementText ="$(Version)" />

</Target>


<Target Name="ConvertReleaseNotesToHtml">
<CreateReleaseNotesHtml ChangelogFile="$(RootDir)/DistFiles/releaseNotes.md"
HtmlFile="$(RootDir)/output/ReleaseNotes.htm" />
</Target>

<Target Name="Installer" DependsOnTargets="VersionNumbers; UpdateDownloadInfo; MakeWixForDistFiles; Build ">

Expand Down
3 changes: 2 additions & 1 deletion build/TestInstallerBuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ REM IF EXIST "\Program Files (x86)\MSBuild\14.0\Bin" SET msbuildpath="\Program F
REM ELSE IF EXIST "\Program Files (x86)\MSBuild\12.0\Bin" SET msbuildpath="\Program Files (x86)\MSBuild\12.0\Bin\MSbuild"
REM ELSE SET msbuildpath=MSbuild
REM %msbuildpath% /target:installer /property:teamcity_build_checkoutDir=..\ /verbosity:detailed /property:teamcity_dotnet_nunitlauncher_msbuild_task="notthere" /property:BUILD_NUMBER="*.*.6.789" /property:Configuration=Release /property:Minor="1"
msbuild /target:installer /property:teamcity_build_checkoutDir=..\ /verbosity:detailed /property:teamcity_dotnet_nunitlauncher_msbuild_task="notthere" /property:BUILD_NUMBER="*.*.6.789" /property:Configuration=Release /property:Minor="1"
msbuild /target:Build /property:teamcity_build_checkoutDir=..\ /verbosity:detailed /property:BUILD_NUMBER="*.*.6.789" /property:Minor="1"
msbuild /target:ConvertReleaseNotesToHtml;installer /property:teamcity_build_checkoutDir=..\ /verbosity:detailed /property:BUILD_NUMBER="*.*.6.789" /property:Minor="1"
popd
GOTO pauseforusertoseeoutput

Expand Down
6 changes: 3 additions & 3 deletions src/template.releasenotes.download_info
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"date": "_DATE_",
"platform": "resource",
"platform_version": "",
"architecture": "x64",
"file": "releasenotes.md",
"type": "md",
"architecture": "",
"file": "ReleaseNotes.htm",
"type": "HTML",
"build": ""
}