Skip to content

Commit a729ffc

Browse files
Merge pull request #288 from ISISComputingGroup/galil_version
detect galil version based on jenkins build name
2 parents 0defc80 + cc29aed commit a729ffc

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

installation_and_upgrade/instrument_install_latest_build_only.bat

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,38 @@ set "GALIL_DIR=C:\Instrument\Apps\EPICS\ioc\master\GALIL"
6363
set "GALIL_OLD_DIR=C:\Instrument\Apps\EPICS\ioc\master\GALIL-OLD"
6464
if exist "%TEMP%\%GALIL_OLD_FILE%" del "%TEMP%\%GALIL_OLD_FILE%"
6565
if exist "%TEMP%\%GALIL_NEW_FILE%" del "%TEMP%\%GALIL_NEW_FILE%"
66+
6667
if exist "%GALIL_DIR%\%GALIL_OLD_FILE%" (
67-
@echo Detected old Galil driver - %GALIL_OLD_FILE% in %GALIL_DIR%
68-
robocopy "%GALIL_DIR%" "%TEMP%" "%GALIL_OLD_FILE%" /R:2 /IS /NFL /NDL /NP /NC /NS /LOG:NUL
6968
set "DETECT_OLD_GALIL=YES"
7069
)
7170
if exist "%GALIL_OLD_DIR%\%GALIL_OLD_FILE%" (
7271
REM GALIL-OLD has not been renamed to GALIL hence we must be using new driver
73-
@echo Detected new Galil driver - %GALIL_OLD_FILE% in %GALIL_OLD_DIR%
74-
copy /y "%GALIL_OLD_DIR%\%GALIL_OLD_FILE%" "%TEMP%\%GALIL_NEW_FILE%"
7572
set "DETECT_NEW_GALIL=YES"
7673
)
74+
REM jenkins
75+
if not "%JOB_NAME%" == "" (
76+
if "%JOB_NAME%" == "System_Tests_galilold" (
77+
set "DETECT_OLD_GALIL=YES"
78+
set "DETECT_NEW_GALIL="
79+
) else (
80+
set "DETECT_OLD_GALIL="
81+
set "DETECT_NEW_GALIL=YES"
82+
)
83+
)
7784
if "%DETECT_OLD_GALIL%" == "YES" (
7885
if "%DETECT_NEW_GALIL%" == "YES" (
7986
@echo ERROR - both NEW and OLD GALIL driver appear enabled, this should not be possible
8087
exit /b 1
8188
)
8289
)
90+
if "%DETECT_OLD_GALIL%" == "YES" (
91+
@echo Detected old Galil driver - %GALIL_OLD_FILE% in %GALIL_DIR%
92+
robocopy "%GALIL_DIR%" "%TEMP%" "%GALIL_OLD_FILE%" /R:2 /IS /NFL /NDL /NP /NC /NS /LOG:NUL
93+
)
94+
if "%DETECT_NEW_GALIL%" == "YES" (
95+
@echo Detected new Galil driver - %GALIL_OLD_FILE% in %GALIL_OLD_DIR%
96+
copy /y "%GALIL_OLD_DIR%\%GALIL_OLD_FILE%" "%TEMP%\%GALIL_NEW_FILE%"
97+
)
8398

8499
if "%1" == "RELEASE" (
85100
REM set INSTALL_TYPE=instrument_install

0 commit comments

Comments
 (0)