Skip to content

Commit

Permalink
Remove unnecessary parts.
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Sep 20, 2017
1 parent fbf57f2 commit 7001502
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
20 changes: 10 additions & 10 deletions bootstrapping/build.netcore.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,9 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
###########################################################################

$DotNetChannel = "2.0"
$SolutionDirectory = "$PSScriptRoot\_SOLUTION_DIRECTORY_"
$BuildProjectFile = "$PSScriptRoot\_BUILD_DIRECTORY_NAME_\_BUILD_PROJECT_NAME_.csproj"
$TempDirectory = "$PSScriptRoot\_ROOT_DIRECTORY_\.tmp"

###########################################################################
# PREPARE BUILD
###########################################################################

function ExecSafe([scriptblock] $cmd) {
& $cmd
if ($LastExitCode -ne 0) { throw "The following call failed with exit code $LastExitCode. '$cmd'" }
}
$TempDirectory = "$PSScriptRoot\.tmp"

$DotNetScriptUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1"
$DotNetDirectory = "$TempDirectory\dotnet"
Expand All @@ -35,6 +26,15 @@ $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
$env:NUGET_XMLDOC_MODE = "skip"

###########################################################################
# PREPARE BUILD
###########################################################################

function ExecSafe([scriptblock] $cmd) {
& $cmd
if ($LastExitCode -ne 0) { throw "The following call failed with exit code $LastExitCode. '$cmd'" }
}

if (!$NoInit) {
md -force $DotNetDirectory > $null

Expand Down
10 changes: 5 additions & 5 deletions bootstrapping/build.netcore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
###########################################################################

DOTNET_CHANNEL="2.0"
SOLUTION_DIRECTORY="$SCRIPT_DIR/_SOLUTION_DIRECTORY_"
BUILD_PROJECT_FILE="$SCRIPT_DIR/_BUILD_DIRECTORY_NAME_/_BUILD_PROJECT_NAME_.csproj"
TEMP_DIRECTORY="$SCRIPT_DIR/_ROOT_DIRECTORY_/.tmp"

###########################################################################
# PREPARE BUILD
###########################################################################
TEMP_DIRECTORY="$SCRIPT_DIR/.tmp"

DOTNET_SCRIPT_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh"
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet"
Expand All @@ -35,6 +31,10 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
export NUGET_XMLDOC_MODE="skip"

###########################################################################
# PREPARE BUILD
###########################################################################

if ! ((NOINIT)); then
mkdir -p "$DOTNET_DIRECTORY"

Expand Down
16 changes: 8 additions & 8 deletions bootstrapping/build.netfx.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
###########################################################################

$NuGetVersion = "_NUGET_VERSION_"
$SolutionDirectory = "$PSScriptRoot\_SOLUTION_DIRECTORY_"
$BuildProjectFile = "$PSScriptRoot\_BUILD_DIRECTORY_NAME_\_BUILD_PROJECT_NAME_.csproj"
$BuildExeFile = "$PSScriptRoot\_BUILD_DIRECTORY_NAME_\bin\debug\_BUILD_PROJECT_NAME_.exe"
$TempDirectory = "$PSScriptRoot\_ROOT_DIRECTORY_\.tmp"

$TempDirectory = "$PSScriptRoot\.tmp"

$NuGetUrl = ""https://dist.nuget.org/win-x86-commandline/$NuGetVersion/nuget.exe""
$NuGetFile = "$TempDirectory\nuget.exe"
$env:NUGET_EXE = $NuGetFile

###########################################################################
# PREPARE BUILD
Expand All @@ -27,18 +31,14 @@ function ExecSafe([scriptblock] $cmd) {
if ($LastExitCode -ne 0) { throw "The following call failed with exit code $LastExitCode. '$cmd'" }
}

$NuGetUrl = ""https://dist.nuget.org/win-x86-commandline/$NuGetVersion/nuget.exe""
$NuGetFile = "$TempDirectory\nuget.exe"
$env:NUGET_EXE = $NuGetFile

if (!$NoInit) {
md -force $TempDirectory > $null

if (!(Test-Path $NuGetFile)) { (New-Object System.Net.WebClient).DownloadFile($NuGetUrl, $NuGetFile) }
elseif ($NuGetUrl.Contains("latest")) { & $NuGetFile update -Self }

ExecSafe { & $NuGetFile restore $BuildProjectFile -SolutionDirectory $SolutionDirectory }
ExecSafe { & $NuGetFile install Nuke.MSBuildLocator -ExcludeVersion -OutputDirectory $TempDirectory -SolutionDirectory $SolutionDirectory }
ExecSafe { & $NuGetFile restore $BuildProjectFile }
ExecSafe { & $NuGetFile install Nuke.MSBuildLocator -ExcludeVersion -OutputDirectory $TempDirectory }
}

$MSBuildFile = & "$TempDirectory\Nuke.MSBuildLocator\tools\Nuke.MSBuildLocator.exe"
Expand Down
12 changes: 6 additions & 6 deletions bootstrapping/build.netfx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
###########################################################################

NUGET_VERSION="_NUGET_VERSION_"
SOLUTION_DIRECTORY="$SCRIPT_DIR/_SOLUTION_DIRECTORY_"
BUILD_PROJECT_FILE="$SCRIPT_DIR/_BUILD_DIRECTORY_NAME_/_BUILD_PROJECT_NAME_.csproj"
BUILD_EXE_FILE="$SCRIPT_DIR/_BUILD_DIRECTORY_NAME_/bin/Debug/_BUILD_PROJECT_NAME_.exe"
TEMP_DIRECTORY="$SCRIPT_DIR/_ROOT_DIRECTORY_/.tmp"

###########################################################################
# PREPARE BUILD
###########################################################################
TEMP_DIRECTORY="$SCRIPT_DIR/.tmp"

NUGET_URL="https://dist.nuget.org/win-x86-commandline/$NUGET_VERSION/nuget.exe"
NUGET_FILE="$TEMP_DIRECTORY/nuget.exe"
export NUGET_EXE="$NUGET_FILE"

###########################################################################
# PREPARE BUILD
###########################################################################

if ! ((NOINIT)); then
mkdir -p "$TEMP_DIRECTORY"

if [ ! -f "$NUGET_FILE" ]; then curl -Lsfo "$NUGET_FILE" $NUGET_URL;
elif [[ $NUGET_URL == *"latest"* ]]; then mono "$NUGET_FILE" update -Self; fi

mono "$NUGET_FILE" restore "$BUILD_PROJECT_FILE" -SolutionDirectory "$SOLUTION_DIRECTORY"
mono "$NUGET_FILE" restore "$BUILD_PROJECT_FILE"
fi

msbuild "$BUILD_PROJECT_FILE"
Expand Down

0 comments on commit 7001502

Please sign in to comment.