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 9 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
7 changes: 4 additions & 3 deletions ReleaseProcedure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ 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.
Check/update version in master.xml under doc\reference folder in the NHibernate root.
NOTE: This paragraph is changed for 5.3 - if you are releasing earlier version please check instruction from appropriate branch

* Don't forget to commit the above.

Expand Down
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
14 changes: 6 additions & 8 deletions build-common/NHibernate.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
<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>
<VersionPrefix Condition="'$(VersionPrefix)' == ''">5.3.0</VersionPrefix>
<!-- 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>
<VersionSuffix Condition="'$(VersionSuffix)' != '' AND '$(BuildNumber)' != ''">$(VersionSuffix).$(BuildNumber)</VersionSuffix>

<NhAppTargetFrameworks Condition ="$(NhAppTargetFrameworks) == ''">net461;netcoreapp2.0</NhAppTargetFrameworks>
<NhLibTargetFrameworks Condition ="$(NhLibTargetFrameworks) == ''">net461;netcoreapp2.0;netstandard2.0</NhLibTargetFrameworks>
Expand All @@ -27,7 +24,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
14 changes: 9 additions & 5 deletions build-common/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@
<!-- 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/VersionPrefix"
property="version.prefix" />
<property name="project.version" value="${version.prefix}" />
</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
2 changes: 1 addition & 1 deletion doc/NHibernate.shfbproj.template
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<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