Skip to content

Add dev build version suffix #2254

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

Merged
merged 16 commits into from
May 9, 2020
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 @@ -18,3 +18,4 @@ TestResult.xml
.idea/
.vs/
/build-common/NHibernate.dev.props
/doc/reference/master.xml
12 changes: 9 additions & 3 deletions ReleaseProcedure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ Tools\gitreleasemanager\0.7.0\tools\GitReleaseManager.exe create -o nhibernate -
If the release tag does not match the released version with major.minor.release
formalism, the NuGet package will have an invalid link to release notes.

* Check/update version number in common.xml and NHibernate.props under
build-common folder, in master.xml under doc\reference folder, and in
appveyor.yml in the NHibernate root.
* Check/update version number in NHibernate.props under build-common folder.
Clear VersionSuffix if present.

* Don't forget to commit the above.

Expand Down Expand Up @@ -55,3 +54,10 @@ Tools\gitreleasemanager\0.7.0\tools\GitReleaseManager.exe create -o nhibernate -
* If this was a stable branch, merge it forward to master. Perhaps some
changes need to be edited out in the merge, but this will reduce the
risk of some issue being left unfixed on master.

* If this was the master branch, create the stable branch for the new release, named
according to its version with "x" instead of its patch number. By example, "5.3.x".

* If next version is decided set it in NHibernate.props under build-common folder
(in most cases - increment minor version) and set VersionSuffix to "dev".
Commit it directly (without going through a PR).
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 5.2.7.{build}
version: '{build}'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In attempt to minimize the frictions. I see no point in this - appveyour shows branch or tag if available. IMHO that's quite enough:
image

image: Visual Studio 2017
environment:
matrix:
Expand Down
19 changes: 11 additions & 8 deletions build-common/NHibernate.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
<Import Condition="Exists('NHibernate.dev.props')" Project="NHibernate.dev.props"/>

<PropertyGroup>
<VersionMajor Condition="'$(VersionMajor)' == ''">5</VersionMajor>
<VersionMinor Condition="'$(VersionMinor)' == ''">2</VersionMinor>
<VersionPatch Condition="'$(VersionPatch)' == ''">7</VersionPatch>
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
<NhVersion Condition="'$(NhVersion)' == ''" >5.3</NhVersion>
<VersionPatch Condition="'$(VersionPatch)' == ''">0</VersionPatch>
<!-- Clear VersionSuffix for making release and set it to dev for making development builds -->
<VersionSuffix Condition="'$(VersionSuffix)' == ''">dev</VersionSuffix>

<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
<AssemblyVersion>$(VersionMajor).$(VersionMinor).0.0</AssemblyVersion>
<FileVersion>$(VersionPrefix).0</FileVersion>
<VersionPrefix Condition="'$(VersionPrefix)' == ''">$(NhVersion).$(VersionPatch)</VersionPrefix>
<VersionSuffix Condition="'$(VersionSuffix)' != '' AND '$(BuildNumber)' != ''">$(VersionSuffix).$(BuildNumber)</VersionSuffix>
<AssemblyVersion>$(NhVersion).0.0</AssemblyVersion>
<FileVersion Condition="'$(VersionSuffix)' != '' AND '$(BuildNumber)' != ''">$(VersionPrefix).$(BuildNumber)</FileVersion>
<FileVersion Condition="'$(FileVersion)' == ''">$(VersionPrefix).0</FileVersion>

<NhAppTargetFrameworks Condition ="$(NhAppTargetFrameworks) == ''">net461;netcoreapp2.0</NhAppTargetFrameworks>
<NhLibTargetFrameworks Condition ="$(NhLibTargetFrameworks) == ''">net461;netcoreapp2.0;netstandard2.0</NhLibTargetFrameworks>
Expand All @@ -27,7 +29,8 @@
<PackageIconUrl>https://raw.githubusercontent.com/nhibernate/nhibernate-core/master/logo/NHibernate-NuGet.png</PackageIconUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>LGPL-2.1-only</PackageLicenseExpression>
<PackageReleaseNotes>https://github.com/nhibernate/nhibernate-core/blob/$(VersionPrefix)/releasenotes.txt</PackageReleaseNotes>
<PackageReleaseNotes Condition="'$(VersionSuffix)' == ''">https://github.com/nhibernate/nhibernate-core/blob/$(VersionPrefix)/releasenotes.txt</PackageReleaseNotes>
<PackageReleaseNotes Condition="'$(PackageReleaseNotes)' == ''">This is development version for testing purposes only</PackageReleaseNotes>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand Down
26 changes: 21 additions & 5 deletions build-common/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,31 @@
<!-- Path to the folder that contain the external assemblies -->
<property name="lib.dir" value="lib" dynamic="true" />

<!-- This is used only for build folder -->
<!-- TODO: Either remove or refactor to use NHibernate.props -->
<property name="project.version" value="5.2.7" overwrite="false" />
<property name="project.version.numeric" value="5.2.7" overwrite="false" />
<!-- This is used for build folder and also for "API Reference" docs (not active task, see doc/NHibernate.shfbproj.template) -->
<target name="get-project-version">
<xmlpeek
file="${root.dir}/build-common/NHibernate.props"
xpath="/Project/PropertyGroup/NhVersion"
property="version.short" />
<xmlpeek
file="${root.dir}/build-common/NHibernate.props"
xpath="/Project/PropertyGroup/VersionPatch"
property="version.patch" />
<property name="project.version" value="${version.short}.${version.patch}" />
</target>

<target name="set-doc-version">
<copy file="${root.dir}/doc/reference/master.template.xml" tofile="${root.dir}/doc/reference/master.xml" overwrite="true" />
<xmlpoke
file="${root.dir}/doc/reference/master.xml"
xpath="/book/bookinfo/releaseinfo"
value="${version.short}" />
</target>

<!-- properties used to connect to database for testing -->
<include buildfile="nhibernate-properties.xml" />

<target name="common.init" description="Initializes build properties">
<target name="common.init" depends="get-project-version" description="Initializes build properties">
<property name="project.config" value="debug" overwrite="false" />
<property name="build.name" value="NHibernate-${project.version}" if="${project.config == 'release'}"/>
<property name="build.name" value="NHibernate-${project.version}-${project.config}" unless="${project.config == 'release'}" />
Expand Down
5 changes: 4 additions & 1 deletion default.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project
name="NHibernate"
default="build"
xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"
xmlns="http://nant.sf.net/release/0.90/nant.xsd"
>

<property name="root.dir" value="." />
Expand All @@ -29,6 +29,7 @@
<target name="build"
depends="init prepare-build-directory nuget.set-properties"
description="Builds NHibernate in the current configuration">
<property name="build.counter" value="" overwrite="false" />

<exec program="dotnet" verbose="true">
<arg value="msbuild" />
Expand All @@ -39,6 +40,8 @@
<arg value="/p:IncludeSymbols=&quot;True&quot;" />
<arg value="/p:IncludeSource=&quot;True&quot;" />
<arg value="/p:PackageOutputPath=&quot;${path::get-full-path(nuget.nupackages.dir)}&quot;" />
<!-- build.counter is not available by default. It needs to be exposed in Team City as system parameter system.build.counter with value %build.counter% -->
<arg value="/p:BuildNumber=&quot;${build.counter}&quot;" unless="${build.counter == ''}" />
<arg value="/t:Restore" />
<arg value="/t:Rebuild" />
<arg value="/v:q" />
Expand Down
6 changes: 3 additions & 3 deletions doc/NHibernate.shfbproj.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<HtmlHelpName>NHibernateAPI</HtmlHelpName>
<HelpFileFormat>HtmlHelp1x</HelpFileFormat>
<CopyrightText>NHibernate</CopyrightText>
<CopyrightHref>nhibernate.info</CopyrightHref>
<FeedbackEMailAddress>http://groups.google.com/group/nhibernate-development</FeedbackEMailAddress>
<CopyrightHref>https://nhibernate.info</CopyrightHref>
<FeedbackEMailAddress>https://groups.google.com/group/nhibernate-development</FeedbackEMailAddress>
<FeedbackEMailLinkText>nhibernate team</FeedbackEMailLinkText>
<HelpTitle>NHibernate API Reference</HelpTitle>
<IndentHtml>False</IndentHtml>
<HelpFileVersion>${project.version.numeric}</HelpFileVersion>
<HelpFileVersion>${project.version}</HelpFileVersion>
<DocumentationSources>
<DocumentationSource sourceFile="${root.dir}/src/NHibernate/bin/${build.config}/net461/NHibernate.dll" />
<DocumentationSource sourceFile="${root.dir}/src/NHibernate/bin/${build.config}/net461/Nhibernate.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<bookinfo>
<title>NHibernate - Relational Persistence for Idiomatic .NET</title>
<subtitle>NHibernate Reference Documentation</subtitle>
<releaseinfo>5.2</releaseinfo>
<releaseinfo></releaseinfo>
</bookinfo>

<toc />
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/reference.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<property name="root.dir" value="../.." />
<include buildfile="${root.dir}/build-common/common.xml" />

<target name="init" depends="common.init">
<target name="init" depends="common.init set-doc-version">
<property name="lang" value="en" />

<property name="output.dir" value="${build.dir}/doc" />
Expand Down