11@ echo off
22setlocal EnableExtensions EnableDelayedExpansion
33
4- REM This script runs from outside the repo to avoid being deleted by git clean
5-
6- REM set "REPO_ROOT=C:\Users\msmik\Documents\src\catalog-service-node"
7- REM "SCRIPT_DIR=%REPO_ROOT%\demo\sdlc-e2e"
8- REM cd /d "%REPO_ROOT%"
9-
104for /f " usebackq delims=" %%I in (`powershell -NoProfile -Command " (Get-Date).ToString('yyyyMMdd')" `) do set " DATE_STAMP = %%I "
115for /f " usebackq delims=" %%I in (`powershell -NoProfile -Command " $env:USERNAME.ToLower()" `) do set " SAFE_USER = %%I "
126set " BRANCH_NAME = demo-%DATE_STAMP% -%SAFE_USER% "
137
14-
15-
16- echo ==> Setting up branch a demo branch named %BRANCH_NAME%
8+ echo Setting up branch a demo branch named %BRANCH_NAME%
179git clean -f
1810git branch -D temp 2 > nul || echo .
1911git branch -D %BRANCH_NAME% 2 > nul || echo .
@@ -24,27 +16,27 @@ git branch -D temp 2>nul || echo.
2416git pull
2517git checkout -b %BRANCH_NAME%
2618
27- echo == > Applying patch and creating a commit
28- powershell -NoProfile -Command " (Get-Content '%SCRIPT_DIR% \demo.patch' -Raw) -replace '`n', \" `r`n\" | Set-Content '%TEMP% \demo-windows.patch' -NoNewline"
19+ echo Applying patch and creating a commit
20+ powershell -NoProfile -Command " (Get-Content '.\demo\sdlc-e23 \demo.patch' -Raw) -replace '`n', \" `r`n\" | Set-Content '%TEMP% \demo-windows.patch' -NoNewline"
2921git apply --whitespace=fix " %TEMP% \demo-windows.patch"
3022del " %TEMP% \demo-windows.patch" 2 > nul
3123git commit -am " Demo prep"
3224
33- echo == > Installing npm dependencies
25+ echo Installing npm dependencies
3426call npm install
35- echo == > npm install completed
27+ echo npm install completed
3628
37- echo == > Downloading container images
29+ echo Downloading container images
3830docker compose pull
3931
40- echo == > Deleting postgres:17.2 container image
32+ echo Deleting postgres:17.2 container image
4133docker image rm postgres:17.2 2 > nul || echo .
4234
43- echo == > Configuring DBC (if this fails, ask to be added to the dockerdevrel organization)
35+ echo Configuring DBC (if this fails, ask to be added to the dockerdevrel organization)
4436docker buildx create --driver cloud dockerdevrel/demo-builder 2 > nul || echo .
4537docker buildx use cloud-dockerdevrel-demo-builder
4638
47- echo == > Configuring Scout
39+ echo Configuring Scout
4840docker scout config organization dockerdevrel
4941
50- echo == > Setup complete!
42+ echo Setup complete!
0 commit comments