Skip to content

Commit

Permalink
Migrate to Nuke build (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
olsh authored Aug 31, 2023
1 parent 2495b27 commit 8036025
Show file tree
Hide file tree
Showing 23 changed files with 784 additions and 143 deletions.
259 changes: 241 additions & 18 deletions .gitignore

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions .idea/.idea.Todoist.Net/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.idea.Todoist.Net/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.Todoist.Net/.idea/GitLink.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/.idea.Todoist.Net/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/.idea.Todoist.Net/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.Todoist.Net/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

122 changes: 122 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
},
"Plan": {
"type": "boolean",
"description": "Shows the execution plan (HTML)"
},
"Profile": {
"type": "array",
"description": "Defines the profiles to load",
"items": {
"type": "string"
}
},
"Root": {
"type": "string",
"description": "Root directory during build execution"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Compile",
"NugetPack",
"Sonar",
"SonarBegin",
"Test",
"UnitTest",
"UpdateBuildVersion"
]
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"sonar:apikey": {
"type": "string",
"description": "SonarQube API key"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"Compile",
"NugetPack",
"Sonar",
"SonarBegin",
"Test",
"UnitTest",
"UpdateBuildVersion"
]
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
}
}
}
}
}
4 changes: 4 additions & 0 deletions .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "./build.schema.json",
"Solution": "Todoist.Net.sln"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Todoist.Net
[![Build status](https://ci.appveyor.com/api/projects/status/r5ylbxtpjya9ayk2?svg=true)](https://ci.appveyor.com/project/olsh/todoist-net)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=todoist-net&metric=alert_status)](https://sonarcloud.io/dashboard?id=todoist-net)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=olsh_todoist-net&metric=alert_status)](https://sonarcloud.io/dashboard?id=olsh_todoist-net)
[![NuGet](https://img.shields.io/nuget/v/Todoist.Net.svg)](https://www.nuget.org/packages/Todoist.Net/)

A [Todoist Sync API](https://developer.todoist.com/sync/v9/) client for .NET.
Expand Down
6 changes: 5 additions & 1 deletion Todoist.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{28A18847-32D8-4A08-A1BF-BC51E3FBAB96}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
build.cake = build.cake
README.md = README.md
.gitignore = .gitignore
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Todoist.Net", "src\Todoist.Net\Todoist.Net.csproj", "{0D84413B-43C0-4F0E-92A6-669F2E9EA5CB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Todoist.Net.Tests", "src\Todoist.Net.Tests\Todoist.Net.Tests.csproj", "{6F7D284C-2790-41E6-BAB5-DB0524F630D7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{51A0DD62-8257-48DA-BE1C-5E1F3DE9A5F2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{51A0DD62-8257-48DA-BE1C-5E1F3DE9A5F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{51A0DD62-8257-48DA-BE1C-5E1F3DE9A5F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D84413B-43C0-4F0E-92A6-669F2E9EA5CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D84413B-43C0-4F0E-92A6-669F2E9EA5CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D84413B-43C0-4F0E-92A6-669F2E9EA5CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
16 changes: 12 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
version: 1.0.{build}
image: Visual Studio 2022

skip_branch_with_pr: true
skip_tags: true

install:
- dotnet tool install -g Cake.Tool --version 2.2.0
- SET JAVA_HOME=C:\Program Files\Java\jdk17
- SET PATH=%JAVA_HOME%\bin;%PATH%

build_script:
- cmd: dotnet cake --Target=CI
- cmd: >-
build.cmd update-build-version sonar unit-test nuget-pack --configuration Release
test: off

cache:
- '%USERPROFILE%\.sonar\cache'
- '%USERPROFILE%\.nuget\packages -> **\*.csproj'
- 'tools -> build.cake'

artifacts:
- path: 'artifacts\*.nupkg'
119 changes: 0 additions & 119 deletions build.cake

This file was deleted.

7 changes: 7 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:; set -eo pipefail
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
:; ${SCRIPT_DIR}/build.sh "$@"
:; exit $?

@ECHO OFF
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*
Loading

0 comments on commit 8036025

Please sign in to comment.