-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Will be amended as necessary before pushing public, but a commit while this at least partially works seems wise.
- Loading branch information
1 parent
0c58519
commit 795f325
Showing
121 changed files
with
875 additions
and
107 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 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
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,20 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<PropertyGroup> | ||
<BuildOS Condition="$([MSBuild]::IsOsPlatform(`Windows`)) == true">Windows</BuildOS> | ||
<BuildOS Condition="$([MSBuild]::IsOsPlatform(`Linux`)) == true">Linux</BuildOS> | ||
<BuildOS Condition="$([MSBuild]::IsOsPlatform(`OSX`)) == true">macOS</BuildOS> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<AssemblyVersion>0.1.0</AssemblyVersion> | ||
<Company>Big Dumb Idiot</Company> | ||
<Copyright>Copyright © 2018</Copyright> | ||
<Product>Arbatel</Product> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
|
||
</Project> |
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,20 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<!-- | ||
<Target Name="Clean"> | ||
<RemoveDir Directories="$(OutputPath)" /> | ||
</Target> | ||
<ItemGroup> | ||
<Blobus Include="$(OutputPath)\*" /> | ||
</ItemGroup> | ||
<Target Name="Package"> | ||
<Message Text="$(MSBuildThisFileDirectory)" /> | ||
<Zip | ||
Files="@(Blobus)" | ||
WorkingDirectory="$(OutputPath)" | ||
ZipFileName="$(OutputPath)\CrystalsOfGringief.zip" /> | ||
</Target>--> | ||
|
||
</Project> |
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,69 @@ | ||
[CmdletBinding()] | ||
Param( | ||
#[switch]$CustomParam, | ||
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] | ||
[string[]]$BuildArguments | ||
) | ||
|
||
Write-Output "Windows PowerShell $($Host.Version)" | ||
|
||
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { exit 1 } | ||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent | ||
|
||
########################################################################### | ||
# CONFIGURATION | ||
########################################################################### | ||
|
||
$BuildProjectFile = "$PSScriptRoot\build\_build.csproj" | ||
$TempDirectory = "$PSScriptRoot\\.tmp" | ||
|
||
$DotNetGlobalFile = "$PSScriptRoot\\global.json" | ||
$DotNetInstallUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1" | ||
$DotNetChannel = "Current" | ||
|
||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 | ||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 | ||
$env:NUGET_XMLDOC_MODE = "skip" | ||
|
||
########################################################################### | ||
# EXECUTION | ||
########################################################################### | ||
|
||
function ExecSafe([scriptblock] $cmd) { | ||
& $cmd | ||
if ($LASTEXITCODE) { exit $LASTEXITCODE } | ||
} | ||
|
||
# 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 | ||
} | ||
} | ||
|
||
# If dotnet is installed locally, and expected version is not set or installation matches the expected version | ||
if ((Get-Command "dotnet" -ErrorAction SilentlyContinue) -ne $null -and ` | ||
(!(Test-Path variable:DotNetVersion) -or $(& dotnet --version) -eq $DotNetVersion)) { | ||
$env:DOTNET_EXE = (Get-Command "dotnet").Path | ||
} | ||
else { | ||
$DotNetDirectory = "$TempDirectory\dotnet-win" | ||
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe" | ||
|
||
# Download install script | ||
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1" | ||
md -force $TempDirectory > $null | ||
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile) | ||
|
||
# Install by channel or version | ||
if (!(Test-Path variable:DotNetVersion)) { | ||
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath } | ||
} else { | ||
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath } | ||
} | ||
} | ||
|
||
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)" | ||
|
||
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile -- $BuildArguments } |
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,72 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo $(bash --version 2>&1 | head -n 1) | ||
|
||
#CUSTOMPARAM=0 | ||
BUILD_ARGUMENTS=() | ||
for i in "$@"; do | ||
case $(echo $1 | awk '{print tolower($0)}') in | ||
# -custom-param) CUSTOMPARAM=1;; | ||
*) BUILD_ARGUMENTS+=("$1") ;; | ||
esac | ||
shift | ||
done | ||
|
||
set -eo pipefail | ||
SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) | ||
|
||
########################################################################### | ||
# CONFIGURATION | ||
########################################################################### | ||
|
||
BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj" | ||
TEMP_DIRECTORY="$SCRIPT_DIR//.tmp" | ||
|
||
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" | ||
DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh" | ||
DOTNET_CHANNEL="Current" | ||
|
||
export DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
export NUGET_XMLDOC_MODE="skip" | ||
|
||
########################################################################### | ||
# EXECUTION | ||
########################################################################### | ||
|
||
function FirstJsonValue { | ||
perl -nle 'print $1 if m{"'$1'": "([^"\-]+)",?}' <<< ${@:2} | ||
} | ||
|
||
# If global.json exists, load expected version | ||
if [ -f "$DOTNET_GLOBAL_FILE" ]; then | ||
DOTNET_VERSION=$(FirstJsonValue "version" $(cat "$DOTNET_GLOBAL_FILE")) | ||
if [ "$DOTNET_VERSION" == "" ]; then | ||
unset DOTNET_VERSION | ||
fi | ||
fi | ||
|
||
# If dotnet is installed locally, and expected version is not set or installation matches the expected version | ||
if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version) == "$DOTNET_VERSION") ]]; then | ||
export DOTNET_EXE="$(command -v dotnet)" | ||
else | ||
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" | ||
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" | ||
|
||
# Download install script | ||
DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" | ||
mkdir -p "$TEMP_DIRECTORY" | ||
curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" | ||
chmod +x "$DOTNET_INSTALL_FILE" | ||
|
||
# Install by channel or version | ||
if [ -z ${DOTNET_VERSION+x} ]; then | ||
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path | ||
else | ||
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path | ||
fi | ||
fi | ||
|
||
echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)" | ||
|
||
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" -- ${BUILD_ARGUMENTS[@]} |
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,10 @@ | ||
[*.cs] | ||
dotnet_style_qualification_for_field = false:warning | ||
dotnet_style_qualification_for_property = false:warning | ||
dotnet_style_qualification_for_method = false:warning | ||
dotnet_style_qualification_for_event = false:warning | ||
dotnet_style_require_accessibility_modifiers = never:warning | ||
|
||
csharp_style_expression_bodied_properties = true:warning | ||
csharp_style_expression_bodied_indexers = true:warning | ||
csharp_style_expression_bodied_accessors = true:warning |
Oops, something went wrong.