Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Commit

Permalink
Merge pull request #11 from alhardy/dev
Browse files Browse the repository at this point in the history
1.2.0 Release
  • Loading branch information
alhardy authored Jun 7, 2017
2 parents 579eefe + 6fee242 commit 4417f40
Show file tree
Hide file tree
Showing 39 changed files with 3,990 additions and 3,555 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ notifications:
- [email protected]

language: csharp
# dotnet: 1.0.0-preview2-003131
dotnet: 1.0.4
os:
- osx
# - osx
- linux
before_script:
- chmod a+x ./build.sh
script:
- ./build_travis.sh
- ./build.sh

# .NET CLI require Ubuntu 14.04
sudo: required
Expand All @@ -24,11 +26,11 @@ addons:
- libunwind8

# .NET CLI require OSX 10.10
osx_image: xcode7.1
before_install:
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi
# osx_image: xcode7.1
# before_install:
# - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi

mono:
mono:
- 4.6.0

cache:
Expand Down
20 changes: 20 additions & 0 deletions AppMetrics.Extensions.Graphite.sln
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App.Metrics.Extensions.Repo
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App.Metrics.Extensions.Reporting.Graphite", "src\App.Metrics.Extensions.Reporting.Graphite\App.Metrics.Extensions.Reporting.Graphite.csproj", "{29032D39-CDCB-410A-8ABF-3B76DF05B87A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{ACF00B7F-5725-4382-A694-8CE2E6F35566}"
ProjectSection(SolutionItems) = preProject
build\common.props = build\common.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App.Metrics.Formatters.Graphite", "src\App.Metrics.Formatters.Graphite\App.Metrics.Formatters.Graphite.csproj", "{82BE33A9-C052-49A7-9A71-8278AA9DB614}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App.Metrics.Formatting.Graphite", "src\App.Metrics.Formatting.Graphite\App.Metrics.Formatting.Graphite.csproj", "{7C62070B-9DC9-4ED1-B5FB-80089D23B7E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -66,6 +75,14 @@ Global
{29032D39-CDCB-410A-8ABF-3B76DF05B87A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29032D39-CDCB-410A-8ABF-3B76DF05B87A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29032D39-CDCB-410A-8ABF-3B76DF05B87A}.Release|Any CPU.Build.0 = Release|Any CPU
{82BE33A9-C052-49A7-9A71-8278AA9DB614}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82BE33A9-C052-49A7-9A71-8278AA9DB614}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82BE33A9-C052-49A7-9A71-8278AA9DB614}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82BE33A9-C052-49A7-9A71-8278AA9DB614}.Release|Any CPU.Build.0 = Release|Any CPU
{7C62070B-9DC9-4ED1-B5FB-80089D23B7E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C62070B-9DC9-4ED1-B5FB-80089D23B7E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C62070B-9DC9-4ED1-B5FB-80089D23B7E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C62070B-9DC9-4ED1-B5FB-80089D23B7E6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -78,5 +95,8 @@ Global
{98118E99-F1DF-4648-A6B6-BC94155908E4} = {70127293-B35A-4C1C-846F-75B26D0D2E73}
{98F2B0A3-B4C1-4FBB-BF3B-B1C312C5638B} = {DD2E4647-7125-4CE3-9BA5-B45A26113A31}
{29032D39-CDCB-410A-8ABF-3B76DF05B87A} = {2D805782-756E-4C98-B22E-F502BEE95318}
{ACF00B7F-5725-4382-A694-8CE2E6F35566} = {31A4DDB1-952E-4EED-96EF-29C669279A86}
{82BE33A9-C052-49A7-9A71-8278AA9DB614} = {2D805782-756E-4C98-B22E-F502BEE95318}
{7C62070B-9DC9-4ED1-B5FB-80089D23B7E6} = {2D805782-756E-4C98-B22E-F502BEE95318}
EndGlobalSection
EndGlobal
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ The repo contains Graphite extension packages to [App Metrics](https://github.co
|Package|Dev Release|Pre-Release|Release|
|------|:--------:|:--------:|:--------:|
|App.Metrics.Extensions.Reporting.Graphite|[![MyGet Status](https://img.shields.io/myget/alhardy/v/App.Metrics.Extensions.Reporting.Graphite.svg?style=flat-square)](https://www.myget.org/feed/alhardy/package/nuget/App.Metrics.Extensions.Reporting.Graphite)|[![NuGet Status](https://img.shields.io/nuget/vpre/App.Metrics.Extensions.Reporting.Graphite.svg?style=flat-square)](https://www.nuget.org/packages/App.Metrics.Extensions.Reporting.Graphite/)|[![NuGet Status](https://img.shields.io/nuget/v/App.Metrics.Extensions.Reporting.Graphite.svg?style=flat-square)](https://www.nuget.org/packages/App.Metrics.Extensions.Reporting.Graphite/)
|App.Metrics.Formatters.Graphite|[![MyGet Status](https://img.shields.io/myget/alhardy/v/App.Metrics.Formatters.Graphite.svg?style=flat-square)](https://www.myget.org/feed/alhardy/package/nuget/App.Metrics.Formatters.Graphite)|[![NuGet Status](https://img.shields.io/nuget/vpre/App.Metrics.Formatters.Graphite.svg?style=flat-square)](https://www.nuget.org/packages/App.Metrics.Formatters.Graphite/)|[![NuGet Status](https://img.shields.io/nuget/v/App.Metrics.Formatters.Graphite.svg?style=flat-square)](https://www.nuget.org/packages/App.Metrics.Formatters.Graphite/)
|App.Metrics.Formatting.Graphite|[![MyGet Status](https://img.shields.io/myget/alhardy/v/App.Metrics.Formatting.Graphite.svg?style=flat-square)](https://www.myget.org/feed/alhardy/package/nuget/App.Metrics.Formatting.Graphite)|[![NuGet Status](https://img.shields.io/nuget/vpre/App.Metrics.Formatting.Graphite.svg?style=flat-square)](https://www.nuget.org/packages/App.Metrics.Formatting.Graphite/)|[![NuGet Status](https://img.shields.io/nuget/v/App.Metrics.Formatting.Graphite.svg?style=flat-square)](https://www.nuget.org/packages/App.Metrics.Formatting.Graphite/)

#### Grafana/Graphite Web Monitoring

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ image: Visual Studio 2017
environment:
COVERALLS_REPO_TOKEN:
secure: ib5FPsslWC/6i1wuOCCWFPLdw56JUhDQ8YsyQpCeskh9FswTXybgkQSGTxkrDLwp
PreReleaseSuffix: stable
PreReleaseSuffix: alpha
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
GitUser:
Expand Down
36 changes: 24 additions & 12 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#tool "nuget:?package=JetBrains.ReSharper.CommandLineTools"
#tool "nuget:?package=coveralls.io"
#tool "nuget:?package=gitreleasemanager"
#tool "nuget:?package=ReportGenerator"

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
Expand All @@ -28,16 +29,16 @@ var buildNumber = HasArgument("BuildNumber") ? Argument<int>("Bu
EnvironmentVariable("BuildNumber") != null ? int.Parse(EnvironmentVariable("BuildNumber")) : 0;
var gitUser = HasArgument("GitUser") ? Argument<string>("GitUser") : EnvironmentVariable("GitUser");
var gitPassword = HasArgument("GitPassword") ? Argument<string>("GitPassword") : EnvironmentVariable("GitPassword");
var skipHtmlCoverageReport = Argument("SkipHtmlCoverageReport", true) || !IsRunningOnWindows();

//////////////////////////////////////////////////////////////////////
// DEFINE FILES & DIRECTORIES
//////////////////////////////////////////////////////////////////////
var packDirs = new [] { Directory("./src/App.Metrics.Extensions.Reporting.Graphite") };
var packDirs = new [] { Directory("./src/App.Metrics.Extensions.Reporting.Graphite"), Directory("./src/App.Metrics.Formatters.Graphite"), Directory("./src/App.Metrics.Formatting.Graphite") };
var artifactsDir = (DirectoryPath) Directory("./artifacts");
var testResultsDir = (DirectoryPath) artifactsDir.Combine("test-results");
var coverageResultsDir = (DirectoryPath) artifactsDir.Combine("coverage");
var reSharperReportsDir = (DirectoryPath) artifactsDir.Combine("resharper-reports");
var testCoverageOutputFilePath = coverageResultsDir.CombineWithFilePath("coverage.xml");
var testOCoverageOutputFilePath = coverageResultsDir.CombineWithFilePath("openCoverCoverage.xml");
var htmlCoverageReport = coverageResultsDir.FullPath + "/coverage.html";
var mergedCoverageSnapshots = coverageResultsDir.FullPath + "/coverage.dcvr";
Expand All @@ -58,6 +59,17 @@ var openCoverExcludeFile = "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs";
var coverIncludeFilter = "+:App.Metrics*";
var coverExcludeFilter = "-:*.Facts";
var excludeFromCoverage = "*.AppMetricsExcludeFromCodeCoverage*";
string versionSuffix = null;

if (!string.IsNullOrEmpty(preReleaseSuffix))
{
versionSuffix = preReleaseSuffix + "-" + buildNumber.ToString("D4");
}
else if (AppVeyor.IsRunningOnAppVeyor && !AppVeyor.Environment.Repository.Tag.IsTag)
{
versionSuffix = buildNumber.ToString("D4");
}


//////////////////////////////////////////////////////////////////////
// TASKS
Expand Down Expand Up @@ -115,7 +127,14 @@ Task("Build")
.IsDependentOn("Restore")
.Does(() =>
{
var settings = new DotNetCoreBuildSettings { Configuration = configuration };
var settings = new DotNetCoreBuildSettings { Configuration = configuration, VersionSuffix = versionSuffix };

Context.Information("Building using preReleaseSuffix: " + preReleaseSuffix);
Context.Information("Building using versionSuffix: " + versionSuffix);

// Workaround to fixing pre-release version package references - https://github.com/NuGet/Home/issues/4337
settings.ArgumentCustomization = args=>args.Append("/t:Restore /p:RestoreSources=https://api.nuget.org/v3/index.json;https://www.myget.org/F/alhardy/api/v3/index.json;");


if (IsRunningOnWindows())
{
Expand Down Expand Up @@ -164,13 +183,6 @@ Task("Pack")
}

Context.Information("Packing using preReleaseSuffix: " + preReleaseSuffix);

string versionSuffix = null;
if (!string.IsNullOrEmpty(preReleaseSuffix))
{
versionSuffix = preReleaseSuffix + "-" + buildNumber.ToString("D4");
}

Context.Information("Packing using versionSuffix: " + versionSuffix);

var settings = new DotNetCorePackSettings
Expand Down Expand Up @@ -231,7 +243,7 @@ Task("RunTests")
});

Task("HtmlCoverageReport")
.WithCriteria(() => FileExists(testCoverageOutputFilePath) && coverWith != "None" && IsRunningOnWindows())
.WithCriteria(() => IsRunningOnWindows() && FileExists(testOCoverageOutputFilePath) && coverWith != "None" && !skipHtmlCoverageReport)
.IsDependentOn("RunTests")
.Does(() =>
{
Expand All @@ -246,7 +258,7 @@ Task("HtmlCoverageReport")
}
else if (coverWith == "OpenCover")
{
ReportGenerator(testCoverageOutputFilePath, coverageResultsDir);
ReportGenerator(testOCoverageOutputFilePath, coverageResultsDir);
}
});

Expand Down
32 changes: 31 additions & 1 deletion build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
# Define directories.
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TOOLS_DIR=$SCRIPT_DIR/tools
ADDINS_DIR=$TOOLS_DIR/Addins
MODULES_DIR=$TOOLS_DIR/Modules
NUGET_EXE=$TOOLS_DIR/nuget.exe
CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe
PACKAGES_CONFIG=$TOOLS_DIR/packages.config
PACKAGES_CONFIG_MD5=$TOOLS_DIR/packages.config.md5sum
ADDINS_PACKAGES_CONFIG=$ADDINS_DIR/packages.config
MODULES_PACKAGES_CONFIG=$MODULES_DIR/packages.config

# Define md5sum or md5 depending on Linux/OSX
MD5_EXE=
Expand Down Expand Up @@ -79,14 +83,40 @@ fi

mono "$NUGET_EXE" install -ExcludeVersion
if [ $? -ne 0 ]; then
echo "Could not restore NuGet packages."
echo "Could not restore NuGet tools."
exit 1
fi

$MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' >| "$PACKAGES_CONFIG_MD5"

popd >/dev/null

# Restore addins from NuGet.
if [ -f "$ADDINS_PACKAGES_CONFIG" ]; then
pushd "$ADDINS_DIR" >/dev/null

mono "$NUGET_EXE" install -ExcludeVersion
if [ $? -ne 0 ]; then
echo "Could not restore NuGet addins."
exit 1
fi

popd >/dev/null
fi

# Restore modules from NuGet.
if [ -f "$MODULES_PACKAGES_CONFIG" ]; then
pushd "$MODULES_DIR" >/dev/null

mono "$NUGET_EXE" install -ExcludeVersion
if [ $? -ne 0 ]; then
echo "Could not restore NuGet modules."
exit 1
fi

popd >/dev/null
fi

# Make sure that Cake has been installed.
if [ ! -f "$CAKE_EXE" ]; then
echo "Could not find Cake.exe at '$CAKE_EXE'."
Expand Down
31 changes: 31 additions & 0 deletions build/common.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project>
<PropertyGroup>
<Copyright>Allan Hardy 2016</Copyright>
<Authors>Allan Hardy</Authors>
<NoWarn>$(NoWarn);1701;1702;1705;CS1591;CS1570</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageIconUrl>http://app-metrics.io/logo.png</PackageIconUrl>
<PackageProjectUrl>http://app-metrics.io/reporting/graphite.html</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/alhardy/AppMetrics.Extensions.Graphite/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/alhardy/AppMetrics.Extensions.Graphite</RepositoryUrl>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<CodeAnalysisRuleSet>..\..\AppMetrics.ruleset</CodeAnalysisRuleSet>
<DebugType>full</DebugType>
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.0.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
101 changes: 0 additions & 101 deletions build_travis.sh

This file was deleted.

Loading

0 comments on commit 4417f40

Please sign in to comment.