mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2025-02-09 13:14:46 +01:00
Update NUKE version and build script dependencies
This commit is contained in:
parent
592343212f
commit
fc1e098118
1
.gitignore
vendored
1
.gitignore
vendored
@ -261,6 +261,7 @@ __pycache__/
|
|||||||
*.pyc
|
*.pyc
|
||||||
**/launchSettings.json
|
**/launchSettings.json
|
||||||
|
|
||||||
|
.nuke/temp
|
||||||
|
|
||||||
global.json
|
global.json
|
||||||
|
|
||||||
|
135
.nuke/build.schema.json
Normal file
135
.nuke/build.schema.json
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||||
|
"title": "Build Schema",
|
||||||
|
"$ref": "#/definitions/build",
|
||||||
|
"definitions": {
|
||||||
|
"build": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"_solution": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Path to a solution file that is automatically loaded. Default is LibHac.sln"
|
||||||
|
},
|
||||||
|
"Configuration": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)"
|
||||||
|
},
|
||||||
|
"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",
|
||||||
|
"Bitrise",
|
||||||
|
"GitHubActions",
|
||||||
|
"GitLab",
|
||||||
|
"Jenkins",
|
||||||
|
"Rider",
|
||||||
|
"SpaceAutomation",
|
||||||
|
"TeamCity",
|
||||||
|
"Terminal",
|
||||||
|
"TravisCI",
|
||||||
|
"VisualStudio",
|
||||||
|
"VSCode"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"NoLogo": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Disables displaying the NUKE logo"
|
||||||
|
},
|
||||||
|
"NoReflection": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Disable reflection in native builds"
|
||||||
|
},
|
||||||
|
"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": [
|
||||||
|
"AppVeyorBuild",
|
||||||
|
"Clean",
|
||||||
|
"Codegen",
|
||||||
|
"Compile",
|
||||||
|
"Full",
|
||||||
|
"Native",
|
||||||
|
"Pack",
|
||||||
|
"Publish",
|
||||||
|
"Restore",
|
||||||
|
"SetVersion",
|
||||||
|
"Sign",
|
||||||
|
"Standard",
|
||||||
|
"Test",
|
||||||
|
"Zip"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Target": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "List of targets to be invoked. Default is '{default_target}'",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"AppVeyorBuild",
|
||||||
|
"Clean",
|
||||||
|
"Codegen",
|
||||||
|
"Compile",
|
||||||
|
"Full",
|
||||||
|
"Native",
|
||||||
|
"Pack",
|
||||||
|
"Publish",
|
||||||
|
"Restore",
|
||||||
|
"SetVersion",
|
||||||
|
"Sign",
|
||||||
|
"Standard",
|
||||||
|
"Test",
|
||||||
|
"Zip"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Untrimmed": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Don't enable any size-reducing settings on native builds"
|
||||||
|
},
|
||||||
|
"Verbosity": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Logging verbosity during build execution. Default is 'Normal'",
|
||||||
|
"enum": [
|
||||||
|
"Minimal",
|
||||||
|
"Normal",
|
||||||
|
"Quiet",
|
||||||
|
"Verbose"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
4
.nuke/parameters.json
Normal file
4
.nuke/parameters.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"$schema": "./build.schema.json",
|
||||||
|
"Solution": ""
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
version: 0.0.0-{build}
|
version: 0.0.0-{build}
|
||||||
image: Visual Studio 2019
|
image: Visual Studio 2022
|
||||||
environment:
|
environment:
|
||||||
|
IGNORE_NORMALISATION_GIT_HEAD_MOVE: 1
|
||||||
myget_api_key:
|
myget_api_key:
|
||||||
secure: 0xJoYAtR6psXCRvk1qm5czDObkeRjHKPjfe5gIExXVFPwA0VVODYv/hBZYUtz2F3
|
secure: 0xJoYAtR6psXCRvk1qm5czDObkeRjHKPjfe5gIExXVFPwA0VVODYv/hBZYUtz2F3
|
||||||
build_script:
|
build_script:
|
||||||
|
@ -4,4 +4,4 @@
|
|||||||
:; exit $?
|
:; exit $?
|
||||||
|
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
powershell -ExecutionPolicy ByPass -NoProfile "%~dp0build.ps1" %*
|
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*
|
||||||
|
26
build.ps1
26
build.ps1
@ -1,6 +1,6 @@
|
|||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
Param(
|
Param(
|
||||||
[Parameter(Position = 0, Mandatory = $false, ValueFromRemainingArguments = $true)]
|
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
||||||
[string[]]$BuildArguments
|
[string[]]$BuildArguments
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -14,9 +14,9 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
$BuildProjectFile = "$PSScriptRoot\build\_build.csproj"
|
$BuildProjectFile = "$PSScriptRoot\build\_build.csproj"
|
||||||
$TempDirectory = "$PSScriptRoot\.tmp"
|
$TempDirectory = "$PSScriptRoot\\.nuke\temp"
|
||||||
|
|
||||||
$DotNetGlobalFile = "$PSScriptRoot\global.json"
|
$DotNetGlobalFile = "$PSScriptRoot\\global.json"
|
||||||
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
|
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
|
||||||
$DotNetChannel = "Current"
|
$DotNetChannel = "Current"
|
||||||
$DotNetCliVersion = Get-Content DotnetCliVersion.txt
|
$DotNetCliVersion = Get-Content DotnetCliVersion.txt
|
||||||
@ -41,19 +41,23 @@ try {
|
|||||||
|
|
||||||
# If global.json exists, load expected version
|
# If global.json exists, load expected version
|
||||||
if (Test-Path $DotNetGlobalFile) {
|
if (Test-Path $DotNetGlobalFile) {
|
||||||
$DotNetVersion = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json).sdk.version
|
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
|
||||||
|
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
|
||||||
|
$DotNetVersion = $DotNetGlobal.sdk.version
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$DotNetDirectory = "$TempDirectory\dotnet-win"
|
$DotNetDirectory = "$TempDirectory\dotnet-win"
|
||||||
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
|
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
|
||||||
|
|
||||||
# If dotnet is installed locally, and expected version is not set or installation matches the expected version
|
# If dotnet CLI is installed globally and it matches requested version, use for execution
|
||||||
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
|
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
|
||||||
(!(Test-Path variable:DotNetVersion) -or $(& cmd.exe /c 'dotnet --version 2>&1') -eq $DotNetVersion)) {
|
$(dotnet --version) -eq $DotNetVersion) {
|
||||||
$env:DOTNET_EXE = (Get-Command "dotnet").Path
|
$env:DOTNET_EXE = (Get-Command "dotnet").Path
|
||||||
}
|
}
|
||||||
|
# If dotnet CLI is installed locally and it matches requested version, use for execution
|
||||||
elseif ($null -eq (Get-Command $env:DOTNET_EXE -ErrorAction SilentlyContinue) -or `
|
elseif ($null -eq (Get-Command $env:DOTNET_EXE -ErrorAction SilentlyContinue) -or `
|
||||||
!(Test-Path variable:DotNetVersion) -or $(& cmd.exe /c "$env:DOTNET_EXE --version 2>&1") -ne $DotNetVersion) {
|
!(Test-Path variable:DotNetVersion) -or $(& $env:DOTNET_EXE --version) -ne $DotNetVersion) {
|
||||||
|
|
||||||
# Download install script
|
# Download install script
|
||||||
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
|
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
|
||||||
@ -63,11 +67,11 @@ try {
|
|||||||
|
|
||||||
# Install by channel or version
|
# Install by channel or version
|
||||||
if (!(Test-Path variable:DotNetVersion)) {
|
if (!(Test-Path variable:DotNetVersion)) {
|
||||||
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
|
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
|
||||||
}
|
} else {
|
||||||
else {
|
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
|
||||||
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
|
|
||||||
}
|
}
|
||||||
|
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
|
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
|
||||||
|
13
build.sh
13
build.sh
@ -10,9 +10,9 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj"
|
BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj"
|
||||||
TEMP_DIRECTORY="$SCRIPT_DIR/.tmp"
|
TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"
|
||||||
|
|
||||||
DOTNET_GLOBAL_FILE="$SCRIPT_DIR/global.json"
|
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
|
||||||
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
|
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
|
||||||
DOTNET_CHANNEL="Current"
|
DOTNET_CHANNEL="Current"
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ export DOTNET_MULTILEVEL_LOOKUP=0
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
function FirstJsonValue {
|
function FirstJsonValue {
|
||||||
perl -nle 'print $1 if m{"'$1'": "([^"\-]+)",?}' <<< ${@:2}
|
perl -nle 'print $1 if m{"'"$1"'": "([^"]+)",?}' <<< "${@:2}"
|
||||||
}
|
}
|
||||||
trap "rm -f \"$DOTNET_GLOBAL_FILE\"" INT TERM EXIT
|
trap "rm -f \"$DOTNET_GLOBAL_FILE\"" INT TERM EXIT
|
||||||
|
|
||||||
@ -35,14 +35,14 @@ json="{\"sdk\":{\"version\":\"$dotnetCliVersion\"}}"
|
|||||||
echo "$json" > "$DOTNET_GLOBAL_FILE"
|
echo "$json" > "$DOTNET_GLOBAL_FILE"
|
||||||
|
|
||||||
# If global.json exists, load expected version
|
# If global.json exists, load expected version
|
||||||
if [ -f "$DOTNET_GLOBAL_FILE" ]; then
|
if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then
|
||||||
DOTNET_VERSION=$dotnetCliVersion
|
DOTNET_VERSION=$dotnetCliVersion
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix"
|
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix"
|
||||||
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
|
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
|
||||||
|
|
||||||
# If dotnet is installed locally, and expected version is not set or installation matches the expected version
|
# If dotnet CLI is installed globally and it matches requested version, use for execution
|
||||||
if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version) == "$DOTNET_VERSION") ]]; then
|
if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version) == "$DOTNET_VERSION") ]]; then
|
||||||
export DOTNET_EXE="$(command -v dotnet)"
|
export DOTNET_EXE="$(command -v dotnet)"
|
||||||
elif [[ ! (-x "$DOTNET_EXE" && (-z ${DOTNET_VERSION+x} || $($DOTNET_EXE --version) == "$DOTNET_VERSION")) ]]; then
|
elif [[ ! (-x "$DOTNET_EXE" && (-z ${DOTNET_VERSION+x} || $($DOTNET_EXE --version) == "$DOTNET_VERSION")) ]]; then
|
||||||
@ -57,7 +57,8 @@ elif [[ ! (-x "$DOTNET_EXE" && (-z ${DOTNET_VERSION+x} || $($DOTNET_EXE --versio
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install by channel or version
|
# Install by channel or version
|
||||||
if [ -z ${DOTNET_VERSION+x} ]; then
|
|
||||||
|
if [[ -z ${DOTNET_VERSION+x} ]]; then
|
||||||
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path
|
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path
|
||||||
else
|
else
|
||||||
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
|
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
|
||||||
|
@ -43,7 +43,7 @@ partial class Build : NukeBuild
|
|||||||
AbsolutePath TestsDirectory => RootDirectory / "tests";
|
AbsolutePath TestsDirectory => RootDirectory / "tests";
|
||||||
AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts";
|
AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts";
|
||||||
AbsolutePath SignedArtifactsDirectory => ArtifactsDirectory / "signed";
|
AbsolutePath SignedArtifactsDirectory => ArtifactsDirectory / "signed";
|
||||||
AbsolutePath TempDirectory => RootDirectory / ".tmp";
|
AbsolutePath TempDirectory => RootDirectory / ".nuke" / "temp";
|
||||||
AbsolutePath CliCoreDir => TempDirectory / "hactoolnet_net5.0";
|
AbsolutePath CliCoreDir => TempDirectory / "hactoolnet_net5.0";
|
||||||
AbsolutePath CliNativeDir => TempDirectory / $"hactoolnet_{HostOsName}";
|
AbsolutePath CliNativeDir => TempDirectory / $"hactoolnet_{HostOsName}";
|
||||||
AbsolutePath CliNativeExe => CliNativeDir / $"hactoolnet{NativeProgramExtension}";
|
AbsolutePath CliNativeExe => CliNativeDir / $"hactoolnet{NativeProgramExtension}";
|
||||||
@ -142,21 +142,21 @@ partial class Build : NukeBuild
|
|||||||
suffix += $"+{gitVersion.Sha.Substring(0, 8)}";
|
suffix += $"+{gitVersion.Sha.Substring(0, 8)}";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Host == HostType.AppVeyor)
|
if (Host is AppVeyor appVeyor)
|
||||||
{
|
{
|
||||||
// Workaround GitVersion issue by getting PR info manually https://github.com/GitTools/GitVersion/issues/1927
|
// Workaround GitVersion issue by getting PR info manually https://github.com/GitTools/GitVersion/issues/1927
|
||||||
string prNumber = Environment.GetEnvironmentVariable("APPVEYOR_PULL_REQUEST_NUMBER");
|
int? prNumber = appVeyor.PullRequestNumber;
|
||||||
string branchName = Environment.GetEnvironmentVariable("APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH");
|
string branchName = Environment.GetEnvironmentVariable("APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH");
|
||||||
|
|
||||||
if (int.TryParse(prNumber, out int prInt) && branchName != null)
|
if (prNumber != null && branchName != null)
|
||||||
{
|
{
|
||||||
string prString = $"PullRequest{prInt:D4}";
|
string prString = $"PullRequest{prNumber:D4}";
|
||||||
|
|
||||||
VersionString = VersionString.Replace(branchName, prString);
|
VersionString = VersionString.Replace(branchName, prString);
|
||||||
suffix = suffix.Replace(branchName, prString);
|
suffix = suffix?.Replace(branchName, prString) ?? "";
|
||||||
}
|
}
|
||||||
|
|
||||||
SetAppVeyorVersion(VersionString);
|
appVeyor.UpdateBuildVersion(VersionString);
|
||||||
}
|
}
|
||||||
|
|
||||||
VersionProps = new Dictionary<string, object>
|
VersionProps = new Dictionary<string, object>
|
||||||
@ -256,8 +256,6 @@ partial class Build : NukeBuild
|
|||||||
RepackNugetPackage(filename);
|
RepackNugetPackage(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Host != HostType.AppVeyor) return;
|
|
||||||
|
|
||||||
foreach (string filename in Directory.EnumerateFiles(ArtifactsDirectory, "*.*nupkg"))
|
foreach (string filename in Directory.EnumerateFiles(ArtifactsDirectory, "*.*nupkg"))
|
||||||
{
|
{
|
||||||
PushArtifact(filename);
|
PushArtifact(filename);
|
||||||
@ -292,10 +290,7 @@ partial class Build : NukeBuild
|
|||||||
ZipFiles(CliCoreZip, namesCore);
|
ZipFiles(CliCoreZip, namesCore);
|
||||||
Logger.Normal($"Created {CliCoreZip}");
|
Logger.Normal($"Created {CliCoreZip}");
|
||||||
|
|
||||||
if (Host == HostType.AppVeyor)
|
|
||||||
{
|
|
||||||
PushArtifact(CliCoreZip);
|
PushArtifact(CliCoreZip);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Target Publish => _ => _
|
Target Publish => _ => _
|
||||||
@ -396,11 +391,8 @@ partial class Build : NukeBuild
|
|||||||
ZipFile(CliNativeZip, CliNativeExe, $"hactoolnet{NativeProgramExtension}");
|
ZipFile(CliNativeZip, CliNativeExe, $"hactoolnet{NativeProgramExtension}");
|
||||||
Logger.Normal($"Created {CliNativeZip}");
|
Logger.Normal($"Created {CliNativeZip}");
|
||||||
|
|
||||||
if (Host == HostType.AppVeyor)
|
|
||||||
{
|
|
||||||
PushArtifact(CliNativeZip);
|
PushArtifact(CliNativeZip);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static void ZipFiles(string outFile, IEnumerable<string> files)
|
public static void ZipFiles(string outFile, IEnumerable<string> files)
|
||||||
{
|
{
|
||||||
@ -530,55 +522,20 @@ partial class Build : NukeBuild
|
|||||||
return compressed;
|
return compressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PushArtifact(string path)
|
public static void PushArtifact(string path, string name = null)
|
||||||
{
|
{
|
||||||
|
if (Host is not AppVeyor appVeyor) return;
|
||||||
|
|
||||||
if (!File.Exists(path))
|
if (!File.Exists(path))
|
||||||
{
|
{
|
||||||
Logger.Warn($"Unable to add artifact {path}");
|
Logger.Warn($"Unable to add artifact {path}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var psi = new ProcessStartInfo
|
appVeyor.PushArtifact(path, name);
|
||||||
{
|
|
||||||
FileName = "appveyor",
|
|
||||||
Arguments = $"PushArtifact \"{path}\"",
|
|
||||||
UseShellExecute = false,
|
|
||||||
RedirectStandardOutput = true,
|
|
||||||
RedirectStandardError = true
|
|
||||||
};
|
|
||||||
|
|
||||||
var proc = new Process
|
|
||||||
{
|
|
||||||
StartInfo = psi
|
|
||||||
};
|
|
||||||
|
|
||||||
proc.Start();
|
|
||||||
|
|
||||||
proc.WaitForExit();
|
|
||||||
|
|
||||||
Logger.Normal($"Added AppVeyor artifact {path}");
|
Logger.Normal($"Added AppVeyor artifact {path}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetAppVeyorVersion(string version)
|
|
||||||
{
|
|
||||||
var psi = new ProcessStartInfo
|
|
||||||
{
|
|
||||||
FileName = "appveyor",
|
|
||||||
Arguments = $"UpdateBuild -Version \"{version}\"",
|
|
||||||
UseShellExecute = false,
|
|
||||||
RedirectStandardOutput = true,
|
|
||||||
RedirectStandardError = true
|
|
||||||
};
|
|
||||||
|
|
||||||
var proc = new Process
|
|
||||||
{
|
|
||||||
StartInfo = psi
|
|
||||||
};
|
|
||||||
|
|
||||||
proc.Start();
|
|
||||||
|
|
||||||
proc.WaitForExit();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ReplaceLineEndings(string filename)
|
public static void ReplaceLineEndings(string filename)
|
||||||
{
|
{
|
||||||
string text = File.ReadAllText(filename);
|
string text = File.ReadAllText(filename);
|
||||||
|
@ -42,7 +42,7 @@ public static class ResultCodeGen
|
|||||||
WriteOutput("LibHac/ResultNameResolver.Generated.cs", archiveStr);
|
WriteOutput("LibHac/ResultNameResolver.Generated.cs", archiveStr);
|
||||||
|
|
||||||
string enumStr = PrintEnum(modules);
|
string enumStr = PrintEnum(modules);
|
||||||
WriteOutput("../.tmp/result_enums.txt", enumStr);
|
WriteOutput("../.nuke/temp/result_enums.txt", enumStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ResultSet ReadResults()
|
private static ResultSet ReadResults()
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Nuke.Common" Version="5.0.2" />
|
<PackageReference Include="Nuke.Common" Version="5.3.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -7,14 +7,17 @@
|
|||||||
<RootNamespace>LibHacBuild</RootNamespace>
|
<RootNamespace>LibHacBuild</RootNamespace>
|
||||||
<IsPackable>False</IsPackable>
|
<IsPackable>False</IsPackable>
|
||||||
<NoWarn>CS0649;CS0169</NoWarn>
|
<NoWarn>CS0649;CS0169</NoWarn>
|
||||||
|
<NukeRootDirectory>..</NukeRootDirectory>
|
||||||
|
<NukeScriptDirectory>..</NukeScriptDirectory>
|
||||||
|
<NukeTelemetryVersion>1</NukeTelemetryVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageDownload Include="GitVersion.Tool" Version="[5.8.0]" />
|
<PackageDownload Include="GitVersion.Tool" Version="[5.8.0]" />
|
||||||
<PackageReference Include="CsvHelper" Version="26.0.1" />
|
<PackageReference Include="CsvHelper" Version="27.2.1" />
|
||||||
<PackageReference Include="NuGet.CommandLine" Version="5.8.1" />
|
<PackageReference Include="NuGet.CommandLine" Version="6.0.0" />
|
||||||
<PackageReference Include="Nuke.Common" Version="5.0.2" />
|
<PackageReference Include="Nuke.Common" Version="5.3.0" />
|
||||||
<PackageReference Include="SharpZipLib" Version="1.3.1" />
|
<PackageReference Include="SharpZipLib" Version="1.3.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user