mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Use major + minor from pipeline for assembly versioning (#2012)
This commit is contained in:
@@ -12,9 +12,9 @@
|
|||||||
<RootDir>$(MSBuildThisFileDirectory)</RootDir>
|
<RootDir>$(MSBuildThisFileDirectory)</RootDir>
|
||||||
|
|
||||||
<!-- Defaults-->
|
<!-- Defaults-->
|
||||||
<Major Condition="$(Major) == ''">1</Major>
|
<Major Condition="$(Major) == ''">99</Major>
|
||||||
<Minor Condition="$(Minor) == ''">0</Minor>
|
<Minor Condition="$(Minor) == ''">99</Minor>
|
||||||
<Build_BuildNumber Condition="'$(Build_BuildNumber)' == ''">0.0</Build_BuildNumber>
|
<Build_BuildNumber Condition="'$(Build_BuildNumber)' == ''">99.99</Build_BuildNumber>
|
||||||
<StableRelease Condition="$(StableRelease) == ''">false</StableRelease>
|
<StableRelease Condition="$(StableRelease) == ''">false</StableRelease>
|
||||||
|
|
||||||
<!-- AssemblyVersion should not change for non-major releases. -->
|
<!-- AssemblyVersion should not change for non-major releases. -->
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
<Version>$(VersionPrefix)</Version>
|
<Version>$(VersionPrefix)</Version>
|
||||||
<FileVersion>$(VersionPrefix)</FileVersion>
|
<FileVersion>$(VersionPrefix)</FileVersion>
|
||||||
<InformationalVersion>$(VersionPrefix)</InformationalVersion>
|
<InformationalVersion>$(VersionPrefix)</InformationalVersion>
|
||||||
|
|
||||||
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
|
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
|
||||||
<ToolsServiceTargetRuntimes>win-x64;win-x86;win-arm64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;osx-x64;osx-arm64;linux-x64;linux-arm64</ToolsServiceTargetRuntimes>
|
<ToolsServiceTargetRuntimes>win-x64;win-x86;win-arm64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;osx-x64;osx-arm64;linux-x64;linux-arm64</ToolsServiceTargetRuntimes>
|
||||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ stages:
|
|||||||
value: 'Release'
|
value: 'Release'
|
||||||
# Major version number for the release
|
# Major version number for the release
|
||||||
- name: Major
|
- name: Major
|
||||||
|
value: '4'
|
||||||
|
- name: ManagedBatchParserMajor
|
||||||
value: '3'
|
value: '3'
|
||||||
# Minor version number for the release (should be incremented post a stable release)
|
# Minor version number for the release (should be incremented post a stable release)
|
||||||
- name: Minor
|
- name: Minor
|
||||||
|
value: '7'
|
||||||
|
- name: ManagedBatchParserMinor
|
||||||
value: '0'
|
value: '0'
|
||||||
# Set to true to build a stable release.
|
# Set to true to build a stable release.
|
||||||
- name: StableRelease
|
- name: StableRelease
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ steps:
|
|||||||
displayName: 'Run Automated Release Script'
|
displayName: 'Run Automated Release Script'
|
||||||
inputs:
|
inputs:
|
||||||
filePath: '$(System.DefaultWorkingDirectory)/CrossPlatBuildScripts/AutomatedReleases/sqltoolsserviceRelease.ps1'
|
filePath: '$(System.DefaultWorkingDirectory)/CrossPlatBuildScripts/AutomatedReleases/sqltoolsserviceRelease.ps1'
|
||||||
arguments: '-workspace $(Build.SourcesDirectory) -minTag 4.7.0.0 -target $(Build.SourceBranch) -isPrerelease $false -artifactsBuildId $(Build.BuildId)'
|
arguments: '-workspace $(Build.SourcesDirectory) -minTag $(Major).$(Minor).0.0 -target $(Build.SourceBranch) -isPrerelease $false -artifactsBuildId $(Build.BuildId)'
|
||||||
workingDirectory: '$(Build.SourcesDirectory)'
|
workingDirectory: '$(Build.SourcesDirectory)'
|
||||||
env:
|
env:
|
||||||
GITHUB_DISTRO_MIXIN_PASSWORD: $(github-distro-mixin-password)
|
GITHUB_DISTRO_MIXIN_PASSWORD: $(github-distro-mixin-password)
|
||||||
|
|||||||
@@ -1,18 +1,37 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Targeting both net7.0 and net472 so that other things such as PS cmdlets can use this which need to support a wider range of machines -->
|
<!-- Targeting both net7.0 and net472 so that other things such as PS cmdlets can use this
|
||||||
|
which need to support a wider range of machines -->
|
||||||
<TargetFrameworks>net7.0;net472</TargetFrameworks>
|
<TargetFrameworks>net7.0;net472</TargetFrameworks>
|
||||||
<LangVersion>9.0</LangVersion>
|
<LangVersion>9.0</LangVersion>
|
||||||
<Nullable>disable</Nullable>
|
<Nullable>disable</Nullable>
|
||||||
<AssemblyName>Microsoft.SqlTools.ManagedBatchParser</AssemblyName>
|
<AssemblyName>Microsoft.SqlTools.ManagedBatchParser</AssemblyName>
|
||||||
<Guid>82dd9738-2ad3-4eb3-9f80-18b594e03621</Guid>
|
<Guid>82dd9738-2ad3-4eb3-9f80-18b594e03621</Guid>
|
||||||
<DelaySign>True</DelaySign>
|
<DelaySign>True</DelaySign>
|
||||||
<!-- Explicitly disable since it leads to compilation errors. The .NET 6.0 target is used in tests with internalsVisibleTo attribute.-->
|
<!-- Explicitly disable since it leads to compilation errors. The .NET 6.0 target is used in
|
||||||
|
tests with internalsVisibleTo attribute.-->
|
||||||
<SignAssembly Condition="$(TargetFramework) == 'net472'">True</SignAssembly>
|
<SignAssembly Condition="$(TargetFramework) == 'net472'">True</SignAssembly>
|
||||||
<AssemblyOriginatorKeyFile>$(RootDir)\SQL2003.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>$(RootDir)\SQL2003.snk</AssemblyOriginatorKeyFile>
|
||||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||||
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
|
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
|
||||||
<Product>Microsoft SqlTools Managed batch parser</Product>
|
<Product>Microsoft SqlTools Managed batch parser</Product>
|
||||||
|
<!-- Defaults-->
|
||||||
|
<Major Condition="$(ManagedBatchParserMajor) != ''">$(ManagedBatchParserMajor)</Major>
|
||||||
|
<Minor Condition="$(ManagedBatchParserMinor) != ''">$(ManagedBatchParserMinor)</Minor>
|
||||||
|
|
||||||
|
<!-- AssemblyVersion should not change for non-major releases. -->
|
||||||
|
<AssemblyVersion>$(Major).0.0.0</AssemblyVersion>
|
||||||
|
|
||||||
|
<!-- AssemblyFileVersion should change for every build. -->
|
||||||
|
<!-- For preview releases, sample Version = 3.0.20221104.1-preview -->
|
||||||
|
<!-- For stable releases, sample Version = 3.0.0 -->
|
||||||
|
<VersionPrefix>$(Major).$(Minor).$(Build_BuildNumber)</VersionPrefix>
|
||||||
|
<VersionPrefix Condition="$(StableRelease.Equals('true'))">$(Major).$(Minor).0</VersionPrefix>
|
||||||
|
<VersionSuffix Condition="!$(StableRelease.Equals('true'))">preview</VersionSuffix>
|
||||||
|
<AssemblyFileVersion>$(VersionPrefix)-$(VersionSuffix)</AssemblyFileVersion>
|
||||||
|
<Version>$(VersionPrefix)</Version>
|
||||||
|
<FileVersion>$(VersionPrefix)</FileVersion>
|
||||||
|
<InformationalVersion>$(VersionPrefix)</InformationalVersion>
|
||||||
<!-- TODO FIX THESE WARNINGS ASAP -->
|
<!-- TODO FIX THESE WARNINGS ASAP -->
|
||||||
<NoWarn>$(NoWarn);CA1852</NoWarn>
|
<NoWarn>$(NoWarn);CA1852</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user