Skip to content

Commit

Permalink
Use Version instead of VersionPrefix in csproj files
Browse files Browse the repository at this point in the history
VersionPrefix is only supposed to hold MAJOR.MINOR.PATCH components of a semver-compliant version. So if we want to publish a version that has a pre-release label, our current infrastructure doesn't support it. We either need to (1) parse the version to isolate the pre-release label and add it to VersionSuffix, or (2) just use Version, which is the same as VersionPrefix-VersionSuffix. This change updates our uses of VersionPrefix to Version.
  • Loading branch information
damonbarry committed Mar 27, 2018
1 parent fa9d970 commit 9f7269f
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion iothub/device/src/Microsoft.Azure.Devices.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>1.7.0</VersionPrefix>
<Version>1.7.0</Version>
<Title>Microsoft Azure IoT Device Client SDK</Title>
<Authors>Microsoft</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
2 changes: 1 addition & 1 deletion iothub/service/src/Microsoft.Azure.Devices.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>1.6.0</VersionPrefix>
<Version>1.6.0</Version>
<Title>Microsoft Azure IoT Service Client SDK</Title>
<Authors>Microsoft</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>1.1.0</VersionPrefix>
<Version>1.1.0</Version>
<Title>Microsoft Azure IoT Provisioning Device Client SDK</Title>
<Authors>Microsoft</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>1.1.0</VersionPrefix>
<Version>1.1.0</Version>
<Title>Microsoft Azure IoT Provisioning Service Client SDK</Title>
<Authors>Microsoft</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>1.1.0</VersionPrefix>
<Version>1.1.0</Version>
<Title>Microsoft Azure IoT Provisioning Device Client AMQP Transport</Title>
<Authors>Microsoft</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>1.1.0</VersionPrefix>
<Version>1.1.0</Version>
<Title>Microsoft Azure IoT Provisioning Device Client HTTP Transport</Title>
<Authors>Microsoft</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>1.1.0</VersionPrefix>
<Version>1.1.0</Version>
<Title>Microsoft Azure IoT Provisioning Device Client MQTT Transport</Title>
<Authors>Microsoft</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<PropertyGroup>
<VersionPrefix>1.1.0</VersionPrefix>
<Version>1.1.0</Version>
<Title>Microsoft Azure IoT Provisioning Device Security TPM Client</Title>
<Authors>Microsoft</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
2 changes: 1 addition & 1 deletion shared/src/Microsoft.Azure.Devices.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>1.5.0</VersionPrefix>
<Version>1.5.0</Version>
<Title>Microsoft Azure IoT Devices Shared</Title>
<Authors>Microsoft</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
6 changes: 3 additions & 3 deletions versionupdate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ Function GetVersion($path) {
$extension = Split-Path -leaf $path

$x = [xml](Get-Content $path)
$versionNode = Select-Xml "//VersionPrefix" $x
$versionNode = Select-Xml "//Version" $x
return $versionNode
}

Function UpdateVersion($path, $currentVersion, $desiredVersion) {
$actual = "<VersionPrefix>$currentVersion</VersionPrefix>"
$desired = "<VersionPrefix>$desiredVersion</VersionPrefix>"
$actual = "<Version>$currentVersion</Version>"
$desired = "<Version>$desiredVersion</Version>"
(Get-Content $path) -replace $actual, $desired | Set-Content -Encoding UTF8 $path
}

Expand Down

0 comments on commit 9f7269f

Please sign in to comment.