Skip to content

Commit 3bbd64a

Browse files
committed
Added the ability to run the local build as a non-Windows Authenticated user on MSSQL.
Some quotes in the Build/tSQLt.validatebuild.xml so that it runs?
1 parent eace03b commit 3bbd64a

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Build/LocalBuild.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ ECHO SQLVersion: "deprecated"
1111
ECHO SQLInstanceName: "%~4"
1212
ECHO DBName: "%~5"
1313
ECHO DBLogin: "%~6"
14-
SET DBLogin -E
15-
IF "%~6"!="-v" && "%~6"!="" SET DBLogin %~6
14+
SET DBLogin=-E
15+
IF NOT "%~6"=="-v" IF NOT "%~6"=="" SET DBLogin=%~6
1616
IF "%~7"=="-v" ECHO Verbose ON ELSE ECHO Verbose OFF
17-
17+
ECHO Final Value DBLogin: "%DBLogin%"
1818

1919
REM CALL "%~1\bin\ant" -buildfile Build\tSQLt.experiments.build.xml -Dmsbuild.path="%~2" -verbose || goto :error
2020
REM goto :EOF
@@ -46,7 +46,7 @@ ECHO +-------------------------+
4646
ECHO : Validating BUILD :
4747
ECHO +-------------------------+
4848
IF "%~7"=="-v" @ECHO ON
49-
CALL "%~1\bin\ant" -buildfile Build\tSQLt.validatebuild.xml -Ddb.server=%~4 -Ddb.name=%~5 -Ddb.login="%DBLogin%" -Dsqlcmd.path="\"%~3\"" || goto :error
49+
CALL "%~1\bin\ant" -buildfile Build\tSQLt.validatebuild.xml -Ddb.server="%~4" -Ddb.name=%~5 -Ddb.login="%DBLogin%" -Dsqlcmd.path="\"%~3\"" || goto :error
5050
@ECHO OFF
5151

5252
ECHO +-------------------------+

Build/tSQLt.validatebuild.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@
253253
<echo message=" +----> outputfile: ${execute.sql.outputfile}" />
254254
<echo message=" +----> executeas: ${execute.sql.executeas}" />
255255
<echo message=" +----> sqlconnect: ${execute.sql.sqlconnect}" />
256-
<property name="execute.sql.sqlcmd" value="${sqlcmd.path}\sqlcmd ${execute.sql.sqlconnect} -I -i &quot;${execute.sql.executeas}&quot; ${execute.sql.filename} -v NewDbName=${db.name} DbName=${execute.sql.database} ExecuteStatement=&quot;${execute.sql.statement}&quot; -V11" />
256+
<property name="execute.sql.sqlcmd" value="&quot;${sqlcmd.path}&quot;\sqlcmd ${execute.sql.sqlconnect} -I -i &quot;${execute.sql.executeas}&quot; ${execute.sql.filename} -v NewDbName=${db.name} DbName=${execute.sql.database} ExecuteStatement=&quot;${execute.sql.statement}&quot; -V11" />
257257
<echo message="${execute.sql.sqlcmd}" />
258258
<condition property="execute.sql.statement_or_file.output.tofile">
259259
<not>

CI/containerbuildtSQLt.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111
# Set some variables
1212
#- SQLCMD_HOME
1313
#- ANT_HOME
14-
#- MSBUILD_HOME
14+
#- MSBUILD_HOME (make sure that your HOME environment variables consistently DO NOT end with a backslash "\")
1515
# Go to SSMS and setup your External Tools
1616
#- tSQLt local Dev_tSQLt (ANT)
1717
#- $(SolutionDir)\Build\localBuild.bat
1818
#- "%ANT_HOME%" "%MSBUILD_HOME%" "%SQLCMD_HOME%" <SERVERNAME eg Dev_tSQLt> tSQLt_dev -v
1919
#- $(SolutionDir)
2020
# Open the solution from the repo
21+
22+
23+
ADDITIONAL IRRITATING REQUIREMENTS BECAUSE OF SQL SERVER 2008 R2 and possibly 2012, but who's checking?
24+
- You must have .NET framework 3.5 SP1 installed (https://dotnet.microsoft.com/download/dotnet-framework/thank-you/net35-sp1-web-installer)

0 commit comments

Comments
 (0)