Skip to content
This repository was archived by the owner on Jul 18, 2023. It is now read-only.

Commit 7291210

Browse files
committedAug 27, 2017
Try to sort out 1.0 release build
1 parent 594edb7 commit 7291210

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed
 

‎Build.ps1

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
# Originally based on https://github.com/serilog/serilog/blob/dev/Build.ps1 - (c) Serilog Contributors
22

3-
echo "build: Build started"
4-
53
Push-Location $PSScriptRoot
64

7-
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
8-
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
9-
$suffix = @{
10-
$true = "$revision";
11-
$false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
12-
135
if(Test-Path .\artifacts) {
146
echo "build: Cleaning .\artifacts"
157
Remove-Item .\artifacts -Force -Recurse
168
}
179

18-
& dotnet msbuild "/t:Restore" /p:VersionSuffix=$suffix /p:Configuration=Release
10+
& dotnet restore --no-cache
1911

20-
echo "build: Version suffix is $suffix"
12+
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
13+
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
14+
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
15+
$commitHash = $(git rev-parse --short HEAD)
16+
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""]
17+
18+
echo "build: Package version suffix is $suffix"
19+
echo "build: Build version suffix is $buildSuffix"
2120

2221
foreach ($src in ls src/*) {
23-
Push-Location $src
22+
Push-Location $src
2423

2524
echo "build: Packaging project in $src"
2625

27-
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
28-
if($LASTEXITCODE -ne 0) { exit 1 }
26+
& dotnet build -c Release --version-suffix=$buildSuffix
27+
& dotnet pack -c Release --include-symbols -o ..\..\artifacts --version-suffix=$suffix --no-build
28+
if($LASTEXITCODE -ne 0) { exit 1 }
2929

30-
Pop-Location
30+
Pop-Location
3131
}
3232

33-
foreach ($test in ls test/*.PerformanceTests) {
34-
Push-Location $test
33+
foreach ($test in ls test/*.Tests) {
34+
Push-Location $test
3535

36-
echo "build: Building performance test project in $test"
36+
echo "build: Testing project in $test"
3737

38-
& dotnet build -c Release
39-
if($LASTEXITCODE -ne 0) { exit 2 }
38+
& dotnet test -c Release
39+
if($LASTEXITCODE -ne 0) { exit 3 }
4040

41-
Pop-Location
41+
Pop-Location
4242
}
4343

44-
foreach ($test in ls test/*.Tests) {
45-
Push-Location $test
44+
foreach ($test in ls test/*.PerformanceTests) {
45+
Push-Location $test
4646

47-
echo "build: Testing project in $test"
47+
echo "build: Building performance test project in $test"
4848

49-
& dotnet test -c Release
50-
if($LASTEXITCODE -ne 0) { exit 3 }
49+
& dotnet build -c Release
50+
if($LASTEXITCODE -ne 0) { exit 2 }
5151

52-
Pop-Location
52+
Pop-Location
5353
}
5454

5555
Pop-Location

‎src/InfluxDB.Collector/InfluxDB.Collector.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
77
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
88
<AssemblyName>InfluxDB.Collector</AssemblyName>
9-
<VersionPrefix>1.0.1</VersionPrefix>
9+
<VersionPrefix>1.0.0</VersionPrefix>
1010
<PackageId>InfluxDB.Collector</PackageId>
1111
<PackageTags>influxdb</PackageTags>
1212
<PackageIconUrl>https://raw.githubusercontent.com/influxdata/influxdb-csharp/master/asset/influxdata.jpg</PackageIconUrl>

‎src/InfluxDB.LineProtocol/InfluxDB.LineProtocol.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Description>A .NET library for efficiently sending time series to InfluxDB</Description>
55
<Authors>influxdb-csharp Contributors</Authors>
66
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
7-
<VersionPrefix>1.0.1</VersionPrefix>
7+
<VersionPrefix>1.0.0</VersionPrefix>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
<AssemblyName>InfluxDB.LineProtocol</AssemblyName>
1010
<PackageId>InfluxDB.LineProtocol</PackageId>

0 commit comments

Comments
 (0)
This repository has been archived.