-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replaced Cake with Nuke * Moved build scripts, artifacts and packages to /build directory * New solution Smartstore.Tools.sln (containing Windows specific stuff)
- Loading branch information
1 parent
01b4a59
commit 5b8042b
Showing
28 changed files
with
610 additions
and
282 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Build Schema", | ||
"$ref": "#/definitions/build", | ||
"definitions": { | ||
"build": { | ||
"type": "object", | ||
"properties": { | ||
"Configuration": { | ||
"type": "string", | ||
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", | ||
"enum": [ | ||
"Debug", | ||
"DebugNoRazorCompile", | ||
"Release" | ||
] | ||
}, | ||
"Continue": { | ||
"type": "boolean", | ||
"description": "Indicates to continue a previously failed build attempt" | ||
}, | ||
"Edition": { | ||
"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", | ||
"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" | ||
}, | ||
"Runtime": { | ||
"type": "string" | ||
}, | ||
"Skip": { | ||
"type": "array", | ||
"description": "List of targets to be skipped. Empty list skips all dependencies", | ||
"items": { | ||
"type": "string", | ||
"enum": [ | ||
"Clean", | ||
"Compile", | ||
"Deploy", | ||
"Restore", | ||
"Test", | ||
"Zip" | ||
] | ||
} | ||
}, | ||
"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": [ | ||
"Clean", | ||
"Compile", | ||
"Deploy", | ||
"Restore", | ||
"Test", | ||
"Zip" | ||
] | ||
} | ||
}, | ||
"Verbosity": { | ||
"type": "string", | ||
"description": "Logging verbosity during build execution. Default is 'Normal'", | ||
"enum": [ | ||
"Minimal", | ||
"Normal", | ||
"Quiet", | ||
"Verbose" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "./build.schema.json", | ||
"Solution": "Smartstore.sln" | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Smartstore.Core", "src\Smartstore.Core\Smartstore.Core.csproj", "{163E349C-9F36-4604-8F19-49F43DB1899B}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Smartstore", "src\Smartstore\Smartstore.csproj", "{2DEC17CE-3292-4F40-AC27-2F17ECABC2B2}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4C0385CB-1ABE-4569-AA9D-0C3DCBE44479}" | ||
ProjectSection(SolutionItems) = preProject | ||
src\Smartstore.Modules\module.schema.json = src\Smartstore.Modules\module.schema.json | ||
EndProjectSection | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{1DE93C7F-22CE-462C-BB6E-7282F4403F2E}" | ||
ProjectSection(SolutionItems) = preProject | ||
src\Smartstore.Build\Smartstore.Common.props = src\Smartstore.Build\Smartstore.Common.props | ||
src\Smartstore.Build\Smartstore.Common.targets = src\Smartstore.Build\Smartstore.Common.targets | ||
src\Smartstore.Build\Smartstore.Module.props = src\Smartstore.Build\Smartstore.Module.props | ||
src\Smartstore.Build\Smartstore.Module.targets = src\Smartstore.Build\Smartstore.Module.targets | ||
src\Smartstore.Build\Smartstore.Razor.props = src\Smartstore.Build\Smartstore.Razor.props | ||
EndProjectSection | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{5135A2B0-95B5-46AD-906A-70A2364B892B}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Smartstore.Packager", "tools\Smartstore.Packager\Smartstore.Packager.csproj", "{4BFFDE97-4EC0-423E-91C6-A202FD0A5978}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
DebugNoRazorCompile|Any CPU = DebugNoRazorCompile|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{163E349C-9F36-4604-8F19-49F43DB1899B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{163E349C-9F36-4604-8F19-49F43DB1899B}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{163E349C-9F36-4604-8F19-49F43DB1899B}.DebugNoRazorCompile|Any CPU.ActiveCfg = Debug|Any CPU | ||
{163E349C-9F36-4604-8F19-49F43DB1899B}.DebugNoRazorCompile|Any CPU.Build.0 = Debug|Any CPU | ||
{163E349C-9F36-4604-8F19-49F43DB1899B}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{163E349C-9F36-4604-8F19-49F43DB1899B}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{2DEC17CE-3292-4F40-AC27-2F17ECABC2B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{2DEC17CE-3292-4F40-AC27-2F17ECABC2B2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{2DEC17CE-3292-4F40-AC27-2F17ECABC2B2}.DebugNoRazorCompile|Any CPU.ActiveCfg = Debug|Any CPU | ||
{2DEC17CE-3292-4F40-AC27-2F17ECABC2B2}.DebugNoRazorCompile|Any CPU.Build.0 = Debug|Any CPU | ||
{2DEC17CE-3292-4F40-AC27-2F17ECABC2B2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{2DEC17CE-3292-4F40-AC27-2F17ECABC2B2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{4BFFDE97-4EC0-423E-91C6-A202FD0A5978}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{4BFFDE97-4EC0-423E-91C6-A202FD0A5978}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{4BFFDE97-4EC0-423E-91C6-A202FD0A5978}.DebugNoRazorCompile|Any CPU.ActiveCfg = Debug|Any CPU | ||
{4BFFDE97-4EC0-423E-91C6-A202FD0A5978}.DebugNoRazorCompile|Any CPU.Build.0 = Debug|Any CPU | ||
{4BFFDE97-4EC0-423E-91C6-A202FD0A5978}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{4BFFDE97-4EC0-423E-91C6-A202FD0A5978}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{1DE93C7F-22CE-462C-BB6E-7282F4403F2E} = {4C0385CB-1ABE-4569-AA9D-0C3DCBE44479} | ||
{4BFFDE97-4EC0-423E-91C6-A202FD0A5978} = {5135A2B0-95B5-46AD-906A-70A2364B892B} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {A0A0B995-5D0B-458E-BCC0-1071B76949D1} | ||
EndGlobalSection | ||
EndGlobal |
This file contains 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
This file contains 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
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" %* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
[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\src\Smartstore.Build\Smartstore.Build\Smartstore.Build.csproj" | ||
$TempDirectory = "$PSScriptRoot\\.nuke\temp" | ||
|
||
$DotNetGlobalFile = "$PSScriptRoot\\global.json" | ||
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1" | ||
$DotNetChannel = "Current" | ||
|
||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 | ||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 | ||
$env:DOTNET_MULTILEVEL_LOOKUP = 0 | ||
|
||
########################################################################### | ||
# 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" | ||
} | ||
|
||
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)" | ||
|
||
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 } |
Oops, something went wrong.