Skip to content

Commit fb05231

Browse files
authored
Merge pull request #59 from mikegcoleman/windows-setup-fix
fixed path error, bad echos, removed commented out code
2 parents 8d0990f + 5a76381 commit fb05231

1 file changed

Lines changed: 10 additions & 18 deletions

File tree

demo/sdlc-e2e/setup.cmd

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
@echo off
22
setlocal 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-
104
for /f "usebackq delims=" %%I in (`powershell -NoProfile -Command "(Get-Date).ToString('yyyyMMdd')"`) do set "DATE_STAMP=%%I"
115
for /f "usebackq delims=" %%I in (`powershell -NoProfile -Command "$env:USERNAME.ToLower()"`) do set "SAFE_USER=%%I"
126
set "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%
179
git clean -f
1810
git branch -D temp 2>nul || echo.
1911
git branch -D %BRANCH_NAME% 2>nul || echo.
@@ -24,27 +16,27 @@ git branch -D temp 2>nul || echo.
2416
git pull
2517
git 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"
2921
git apply --whitespace=fix "%TEMP%\demo-windows.patch"
3022
del "%TEMP%\demo-windows.patch" 2>nul
3123
git commit -am "Demo prep"
3224

33-
echo ==> Installing npm dependencies
25+
echo Installing npm dependencies
3426
call npm install
35-
echo ==> npm install completed
27+
echo npm install completed
3628

37-
echo ==> Downloading container images
29+
echo Downloading container images
3830
docker compose pull
3931

40-
echo ==> Deleting postgres:17.2 container image
32+
echo Deleting postgres:17.2 container image
4133
docker 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)
4436
docker buildx create --driver cloud dockerdevrel/demo-builder 2>nul || echo.
4537
docker buildx use cloud-dockerdevrel-demo-builder
4638

47-
echo ==> Configuring Scout
39+
echo Configuring Scout
4840
docker scout config organization dockerdevrel
4941

50-
echo ==> Setup complete!
42+
echo Setup complete!

0 commit comments

Comments
 (0)