Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make Windows build use $PSScriptRoot
This converts the build script for Event Store on Windows to run from any
invocation path rather than relying on it being executed from the root of
the directory structure by using $PSScriptRoot in common with the
deployment scripts.

NOTE: This introduces a dependency on PowerShell 3 minimum, but it's quite
likely that people building from source will already have this.

In addition, now we have a top level scripts directory it makes more sense
for the powershell build script to be in scripts/ rather than
/tools/powershell.
  • Loading branch information
James Nugent committed Jul 12, 2014
1 parent adc9bd1 commit be5d84b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.cmd
Expand Up @@ -8,10 +8,10 @@ if '%1'=='-h' goto help

:: if ($psake.build_success -eq $false) { exit 1 } else { exit 0 }"

powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\tools\powershell\build.ps1' %*;"
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\scripts\build-windows\build.ps1' %*;"
exit /B %errorlevel%

:help

echo Usage:
echo build.cmd ^quick^|full^|clean-all^|v8^|js1^ ^[-Configuration=debug^|release^] ^[-Platform=x64^|x86^] ^[-Version=0.0.0.0^] ^[-SpecificVisualStudioVersion=Windows7.1SDK^|2013^|2012^|2010^] ^[-ForceNetwork^] ^[-Defines=^]
echo build.cmd ^quick^|full^|clean-all^|v8^|js1^ ^[-Configuration=debug^|release^] ^[-Platform=x64^|x86^] ^[-Version=0.0.0.0^] ^[-SpecificVisualStudioVersion=Windows7.1SDK^|2013^|2012^|2010^] ^[-ForceNetwork^] ^[-Defines=^]
File renamed without changes.
File renamed without changes.
Expand Up @@ -23,7 +23,7 @@ $companyName = "Event Store LLP"
$copyright = "Copyright 2012 Event Store LLP. All rights reserved."

#Dependency Repositories and Directories
$baseDirectory = Resolve-Path .
$baseDirectory = Resolve-Path (Join-Path $PSScriptRoot "..\..\")
$srcDirectory = Join-Path $baseDirectory "src"
$libsDirectory = Join-Path $srcDirectory "libs"

Expand Down Expand Up @@ -61,9 +61,8 @@ $libsDirectory = Join-Path $srcDirectory "libs"

#Source scripts

$buildScriptDir = Join-Path $baseDirectory (Join-Path "tools" "powershell")
. (Join-Path $buildScriptDir "build-functions.ps1")
Import-Module (Join-Path $buildScriptDir "EnvironmentVars.dll")
. (Join-Path $PSScriptRoot "build-functions.ps1")
Import-Module (Join-Path $PSScriptRoot "EnvironmentVars.dll")

#Clean if neccessary
Function Clean-All() {
Expand Down

0 comments on commit be5d84b

Please sign in to comment.