Skip to content

Commit

Permalink
Add NUKE and configure GitHub Actions and DanglDocu +semver: major
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgDangl committed Apr 1, 2024
1 parent 3d48740 commit 1262ac0
Show file tree
Hide file tree
Showing 14 changed files with 503 additions and 25 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: continuous

on: [push]

jobs:
windows-latest:
name: windows-latest
runs-on: windows-latest
env:
GitHubAuthenticationToken: ${{ secrets.GITHUB_TOKEN }}
DocuApiKey: ${{ secrets.DOCUAPIKEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Tests
run: ./build.ps1 Tests -Configuration Debug
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: Test Results (${{ runner.os }})
path: output/**/*_testresults.xml
- name: UploadDocumentation+PublishGitHubRelease
run: ./build.ps1 UploadDocumentation+PublishGitHubRelease
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,5 @@ FakesAssemblies/

# Visual Studio 6 workspace options file
*.opt

output/
129 changes: 129 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"$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"
},
"DocuApiKey": {
"type": "string"
},
"DocuBaseUrl": {
"type": "string"
},
"GitHubAuthenticationToken": {
"type": "string"
},
"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": [
"BuildDocFxMetadata",
"BuildDocumentation",
"Clean",
"Compile",
"PublishGitHubRelease",
"Restore",
"Tests",
"UploadDocumentation"
]
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"BuildDocFxMetadata",
"BuildDocumentation",
"Clean",
"Compile",
"PublishGitHubRelease",
"Restore",
"Tests",
"UploadDocumentation"
]
}
},
"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": "IPA.BCFier.sln"
}
24 changes: 4 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
#Changelog
### BCFier 2.2.0 - 07/08/2017
# Changelog

#### New Features
All notable changes to **IPA.BCFier** are documented here.

- implemented BCF 2.1 schema [#29](https://github.com/teocomi/BCFier/issues/29)
- added *topic status* and *topic type* to UI and settings
- removed *comment status* and *verbal status*
- issues can be rearranged via [drag&drop interface](https://github.com/punker76/gong-wpf-dragdrop)
- added support for *topic* *index* and *viewpoint* *index*: this value is set on save [#14](https://github.com/teocomi/BCFier/issues/14)
- upgraded solution to Visual Studio 2017
- merged and linkedAssemblyInfo files
## v3.0.0

#### Bug Fixes

- exception raised when view is captured from schedule (Revit): now a friendly warning message will show, no workaround has been implemented to grab a snapshot of the schedule [#12](https://github.com/teocomi/BCFier/issues/12)


#### To Do

- support of extension.xsd
- support of ReferenceLink
- support of BimSnippet
- Initial release of the **IPA.BCFier** fork
11 changes: 11 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
mode: Mainline

branches:
main:
regex: (origin/)?master
develop:
increment: Patch
tag: beta
regex: (origin/)?dev(elop)?(ment)?$
51 changes: 46 additions & 5 deletions IPA.BCFier.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IPA.Bcfier", "src\IPA.Bcfie
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{97D50745-F340-4DC1-86A8-58C2D7B7D8E3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPA.Bcfier.Tests", "tests\IPA.Bcfier.Tests\IPA.Bcfier.Tests.csproj", "{7A585522-0DDE-4F44-8D77-8D84BAA3AAC0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IPA.Bcfier.Tests", "tests\IPA.Bcfier.Tests\IPA.Bcfier.Tests.csproj", "{7A585522-0DDE-4F44-8D77-8D84BAA3AAC0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6C316DD6-5BCA-4CBC-A36A-182FC7D8B1B6}"
ProjectSection(SolutionItems) = preProject
CHANGELOG.md = CHANGELOG.md
docfx.json = docfx.json
GitVersion.yml = GitVersion.yml
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -44,7 +55,6 @@ Global
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{503CE2C1-09D7-4F15-BB42-86196EE01ED4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{503CE2C1-09D7-4F15-BB42-86196EE01ED4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{503CE2C1-09D7-4F15-BB42-86196EE01ED4}.Debug-2015|Any CPU.ActiveCfg = Debug|Any CPU
{503CE2C1-09D7-4F15-BB42-86196EE01ED4}.Debug-2015|Any CPU.Build.0 = Debug|Any CPU
{503CE2C1-09D7-4F15-BB42-86196EE01ED4}.Debug-2016|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -115,7 +125,6 @@ Global
{2D132990-5674-42DF-93BF-55BA8FDC6A23}.Release-2022|Any CPU.ActiveCfg = Release-2022|Any CPU
{2D132990-5674-42DF-93BF-55BA8FDC6A23}.Release-2022|Any CPU.Build.0 = Release-2022|Any CPU
{3C03085B-63AD-4890-AC2C-A4DE31AF1A6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C03085B-63AD-4890-AC2C-A4DE31AF1A6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C03085B-63AD-4890-AC2C-A4DE31AF1A6B}.Debug-2015|Any CPU.ActiveCfg = Debug|Any CPU
{3C03085B-63AD-4890-AC2C-A4DE31AF1A6B}.Debug-2015|Any CPU.Build.0 = Debug|Any CPU
{3C03085B-63AD-4890-AC2C-A4DE31AF1A6B}.Debug-2016|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -145,7 +154,6 @@ Global
{3C03085B-63AD-4890-AC2C-A4DE31AF1A6B}.Release-2021|Any CPU.ActiveCfg = Release-2021|Any CPU
{3C03085B-63AD-4890-AC2C-A4DE31AF1A6B}.Release-2022|Any CPU.ActiveCfg = Release-2021|Any CPU
{CAF05B60-6A81-489D-B966-7B94F0D69AC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CAF05B60-6A81-489D-B966-7B94F0D69AC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CAF05B60-6A81-489D-B966-7B94F0D69AC7}.Debug-2015|Any CPU.ActiveCfg = Debug-2015|Any CPU
{CAF05B60-6A81-489D-B966-7B94F0D69AC7}.Debug-2015|Any CPU.Build.0 = Debug-2015|Any CPU
{CAF05B60-6A81-489D-B966-7B94F0D69AC7}.Debug-2016|Any CPU.ActiveCfg = Debug-2016|Any CPU
Expand All @@ -171,7 +179,6 @@ Global
{CAF05B60-6A81-489D-B966-7B94F0D69AC7}.Release-2021|Any CPU.ActiveCfg = Release-2021|Any CPU
{CAF05B60-6A81-489D-B966-7B94F0D69AC7}.Release-2022|Any CPU.ActiveCfg = Release-2021|Any CPU
{4CD7CA76-A40E-4DF4-831D-36B64818CC69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4CD7CA76-A40E-4DF4-831D-36B64818CC69}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CD7CA76-A40E-4DF4-831D-36B64818CC69}.Debug-2015|Any CPU.ActiveCfg = Debug|Any CPU
{4CD7CA76-A40E-4DF4-831D-36B64818CC69}.Debug-2015|Any CPU.Build.0 = Debug|Any CPU
{4CD7CA76-A40E-4DF4-831D-36B64818CC69}.Debug-2016|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -272,6 +279,40 @@ Global
{7A585522-0DDE-4F44-8D77-8D84BAA3AAC0}.Release-2021|Any CPU.Build.0 = Release|Any CPU
{7A585522-0DDE-4F44-8D77-8D84BAA3AAC0}.Release-2022|Any CPU.ActiveCfg = Release|Any CPU
{7A585522-0DDE-4F44-8D77-8D84BAA3AAC0}.Release-2022|Any CPU.Build.0 = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2015|Any CPU.ActiveCfg = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2015|Any CPU.Build.0 = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2016|Any CPU.ActiveCfg = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2016|Any CPU.Build.0 = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2017|Any CPU.ActiveCfg = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2017|Any CPU.Build.0 = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2018|Any CPU.ActiveCfg = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2018|Any CPU.Build.0 = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2019|Any CPU.ActiveCfg = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2019|Any CPU.Build.0 = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2020|Any CPU.ActiveCfg = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2020|Any CPU.Build.0 = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2021|Any CPU.ActiveCfg = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2021|Any CPU.Build.0 = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2022|Any CPU.ActiveCfg = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Debug-2022|Any CPU.Build.0 = Debug|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2015|Any CPU.ActiveCfg = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2015|Any CPU.Build.0 = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2016|Any CPU.ActiveCfg = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2016|Any CPU.Build.0 = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2017|Any CPU.ActiveCfg = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2017|Any CPU.Build.0 = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2018|Any CPU.ActiveCfg = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2018|Any CPU.Build.0 = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2019|Any CPU.ActiveCfg = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2019|Any CPU.Build.0 = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2020|Any CPU.ActiveCfg = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2020|Any CPU.Build.0 = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2021|Any CPU.ActiveCfg = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2021|Any CPU.Build.0 = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2022|Any CPU.ActiveCfg = Release|Any CPU
{F8FB59AA-6AB5-42CB-A3A2-088DFBCD2490}.Release-2022|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
![](/Assets/bcfier-text.png)

[Documentation](https://docs.dangl-it.com/Projects/IPA.BCFier)


## Intro
Expand Down
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" %*
74 changes: 74 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[CmdletBinding()]
Param(
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
[string[]]$BuildArguments
)

Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"

Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent

###########################################################################
# CONFIGURATION
###########################################################################

$BuildProjectFile = "$PSScriptRoot\build\_build.csproj"
$TempDirectory = "$PSScriptRoot\\.nuke\temp"

$DotNetGlobalFile = "$PSScriptRoot\\global.json"
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
$DotNetChannel = "STS"

$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
$env:DOTNET_NOLOGO = 1

###########################################################################
# EXECUTION
###########################################################################

function ExecSafe([scriptblock] $cmd) {
& $cmd
if ($LASTEXITCODE) { exit $LASTEXITCODE }
}

# If dotnet CLI is installed globally and it matches requested version, use for execution
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
$(dotnet --version) -and $LASTEXITCODE -eq 0) {
$env:DOTNET_EXE = (Get-Command "dotnet").Path
}
else {
# Download install script
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile)

# If global.json exists, load expected version
if (Test-Path $DotNetGlobalFile) {
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
$DotNetVersion = $DotNetGlobal.sdk.version
}
}

# Install by channel or version
$DotNetDirectory = "$TempDirectory\dotnet-win"
if (!(Test-Path variable:DotNetVersion)) {
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
} else {
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
$env:PATH = "$DotNetDirectory;$env:PATH"
}

Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"

if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
}

ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
Loading

0 comments on commit 1262ac0

Please sign in to comment.