mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Minify the buildscript and update to cake.0.30.0
Also remove the dependency on Cake.CoreCLR cake.tool does not use the packages.config.
This commit is contained in:
parent
e47be64f91
commit
0724b47334
3
.gitignore
vendored
3
.gitignore
vendored
@ -12,8 +12,7 @@
|
||||
|
||||
### Cake ###
|
||||
tools/*
|
||||
!tools/packages.config
|
||||
!tools/cake.csproj
|
||||
!tools/cakebuild.csproj
|
||||
|
||||
# Build results
|
||||
bin/[Dd]ebug/
|
||||
|
17
build.ps1
17
build.ps1
@ -1,7 +1,5 @@
|
||||
##########################################################################
|
||||
# This is the Cake bootstrapper script for PowerShell.
|
||||
# This file was downloaded from https://github.com/cake-build/resources
|
||||
# Feel free to change this file to fit your needs.
|
||||
# This is a customized Cake bootstrapper script for PowerShell.
|
||||
##########################################################################
|
||||
|
||||
<#
|
||||
@ -10,7 +8,7 @@
|
||||
This is a Powershell script to bootstrap a Cake build.
|
||||
|
||||
.DESCRIPTION
|
||||
This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
|
||||
This Powershell script restores NuGet tools (including Cake)
|
||||
and execute your Cake build script with the parameters you provide.
|
||||
|
||||
.PARAMETER Script
|
||||
@ -49,17 +47,21 @@ Param(
|
||||
|
||||
Write-Host "Preparing to run build script..."
|
||||
|
||||
# Determine the script root for resolving other paths.
|
||||
if(!$PSScriptRoot){
|
||||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
|
||||
}
|
||||
|
||||
# Resolve the paths for resources used for debugging.
|
||||
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
|
||||
$CAKE_CSPROJ = Join-Path $TOOLS_DIR "cake.csproj"
|
||||
$CAKE_CSPROJ = Join-Path $TOOLS_DIR "cakebootstrap.csproj"
|
||||
|
||||
Invoke-Expression "dotnet restore `"$CAKE_CSPROJ`" --packages `"$TOOLS_DIR`""
|
||||
# Install the required tools locally.
|
||||
Write-Host "Restoring cake tools..."
|
||||
Invoke-Expression "dotnet restore `"$CAKE_CSPROJ`" --packages `"$TOOLS_DIR`"" | Out-Null
|
||||
|
||||
# Find the Cake executable
|
||||
$CAKE_EXECUTABLE = (Get-ChildItem -Path ./tools/cake.coreclr/ -Filter Cake.dll -Recurse).FullName
|
||||
$CAKE_EXECUTABLE = (Get-ChildItem -Path ./tools/cake.tool/ -Filter Cake.dll -Recurse).FullName
|
||||
|
||||
# Build Cake arguments
|
||||
$cakeArguments = @("$Script");
|
||||
@ -69,7 +71,6 @@ if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" }
|
||||
if ($ShowDescription) { $cakeArguments += "-showdescription" }
|
||||
if ($DryRun) { $cakeArguments += "-dryrun" }
|
||||
if ($Experimental) { $cakeArguments += "-experimental" }
|
||||
if ($Mono) { $cakeArguments += "-mono" }
|
||||
$cakeArguments += $ScriptArgs
|
||||
|
||||
# Start Cake
|
||||
|
@ -1,9 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Cake.CoreCLR" Version="0.29.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
11
tools/cakebuild.csproj
Normal file
11
tools/cakebuild.csproj
Normal file
@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<PackAsTool>true</PackAsTool>
|
||||
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Cake" Version="0.30.0" />
|
||||
<DotnetCliToolReference Include="Cake.Tool" Version="0.30.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Cake.CoreClr" version="0.29.0" />
|
||||
</packages>
|
Loading…
Reference in New Issue
Block a user