This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Startup | |
| { | |
| public Startup(IConfiguration configuration) | |
| { | |
| Configuration = configuration; | |
| } | |
| public IConfiguration Configuration { get; } | |
| public void ConfigureServices(IServiceCollection services) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #tool "nuget:?package=GitVersion.CommandLine" | |
| #addin nuget:?package=Newtonsoft.Json | |
| using Newtonsoft.Json; | |
| var target = Argument("target", "Default"); | |
| var configuration = Argument("configuration", "Release"); | |
| var artifactsDirectory = MakeAbsolute(Directory("./artifacts")); | |
| Setup(context => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '{build}' | |
| pull_requests: | |
| do_not_increment_build_number: true | |
| environment: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| NUGET_API_KEY: | |
| secure: hQ5LogWZGZTKK4u/AlC/X4ThwiCq0JbYNxuOCVMFWzRJwH8VSYHuVry/At69M1kH | |
| build_script: | |
| - ps: .\build.ps1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| language: csharp | |
| os: linux | |
| sudo: required | |
| dist: trusty | |
| addons: | |
| apt: | |
| packages: | |
| - gettext | |
| - libcurl4-openssl-dev | |
| - libicu-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Task("Push-Nuget-Package") | |
| .IsDependentOn("Create-Nuget-Package") | |
| .Does(() => | |
| { | |
| var apiKey = "b5819ebc-3fd4-4e98-b391-665f36aff91e"; //EnvironmentVariable("apiKey"); | |
| foreach (var package in GetFiles($"{artifactsDirectory}/*.nupkg")) | |
| { | |
| NuGetPush(package, | |
| new NuGetPushSettings { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Task("Create-Nuget-Pack") | |
| .IsDependentOn("Test") | |
| .Does(() => | |
| { | |
| foreach (var project in GetFiles("./src/**/*.csproj")) | |
| { | |
| DotNetCorePack( | |
| project.GetDirectory().FullPath, | |
| new DotNetCorePackSettings() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Task("Test") | |
| .IsDependentOn("Build") | |
| .Does(() => | |
| { | |
| foreach(var project in GetFiles("./tests/**/*.csproj")) | |
| { | |
| DotNetCoreTest( | |
| project.GetDirectory().FullPath, | |
| new DotNetCoreTestSettings() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Task("Build") | |
| .Does(() => | |
| { | |
| foreach(var project in GetFiles("./src/**/*.csproj")) | |
| { | |
| DotNetCoreBuild( | |
| project.GetDirectory().FullPath, | |
| new DotNetCoreBuildSettings() | |
| { | |
| Configuration = configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var target = Argument("target", "Default"); | |
| var configuration = Argument("configuration", "Release"); | |
| var artifactsDirectory = MakeAbsolute(Directory("./artifacts")); | |
| /// Aqui devem ser definidas as tasks | |
| Task("Default"); | |
| RunTarget(target); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| protected_branch='master' | |
| current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
| RED='\033[0;31m' | |
| GREEN='\033[1;32m' | |
| YELLOW='\033[1;33m' | |
| NC='\033[0m' # No Color | |
| # only run this if you are pushing to master | |
| if [[ $current_branch = $protected_branch ]] ; then |