Skip to content

Commit a414807

Browse files
committed
vendor dependencies on windows too
1 parent 8b39db5 commit a414807

File tree

2 files changed

+39
-19
lines changed

2 files changed

+39
-19
lines changed

configure.cmd

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -69,30 +69,14 @@ echo Configuration done
6969

7070
POPD
7171

72-
if "%CI%" NEQ "true" (
73-
echo Revendoring quarto dependencies
74-
75-
@REM for /F "tokens=2" %%i in ('date /t') do set today=%%i
76-
@REM RENAME src\vendor src\vendor-%today%
77-
@REM pushd src
78-
@REM echo Vendor phase 1
79-
@REM %QUARTO_DENO% vendor quarto.ts %QUARTO_ROOT%\tests\test-deps.ts --importmap=import_map.json
80-
@REM if ERRORLEVEL NEQ 0 (
81-
@REM popd
82-
@REM echo deno vendor failed (likely because of a download error). Please run the configure script again.
83-
@REM RMDIR vendor
84-
@REM RENAME vendor-${today} vendor
85-
@REM exit 1
86-
@REM )
87-
@REM popd
88-
@REM %QUARTO_DENO% run --unstable --allow-all --importmap=src\import_map.json package\src\common\create-dev-import-map.ts
89-
)
72+
REM download typescript dependencies
73+
CALL package\scripts\vendoring\vendor.cmd
9074

9175
ECHO Downloading Deno Stdlib
9276
CALL !QUARTO_PACKAGE_PATH!\scripts\deno_std\download.bat
9377

94-
SET QUARTO_DENO_EXTRA_OPTIONS="--reload"
9578
IF EXIST !QUARTO_BIN_PATH!\quarto.cmd (
79+
SET QUARTO_DENO_EXTRA_OPTIONS=--reload
9680
CALL "!QUARTO_BIN_PATH!\quarto" --version
9781
)
9882

package/scripts/vendoring/vendor.cmd

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@ECHO OFF
2+
REM You should not need to run this script directly.
3+
REM It is sourced by the configure.cmd script.
4+
SETLOCAL ENABLEDELAYEDEXPANSION
5+
6+
IF "%QUARTO_VENDOR_BINARIES%"=="true" (
7+
SET DENO_BIN_PATH=!QUARTO_BIN_PATH!\tools\!DENO_ARCH_DIR!\deno.exe
8+
) ELSE (
9+
IF NOT DEFINED DENO_BIN_PATH (
10+
ECHO DENO_BIN_PATH is not set. You either need to allow QUARTO_VENDOR_BINARIES or set DENO_BIN_PATH to the path of a deno binary.
11+
EXIT /B 1
12+
)
13+
)
14+
15+
IF NOT DEFINED DENO_DIR (
16+
SET DENO_DIR=!QUARTO_BIN_PATH!\deno_cache
17+
)
18+
19+
ECHO Revendoring quarto dependencies
20+
21+
REM remove deno_cache directory first
22+
IF EXIST "!DENO_DIR!" (
23+
RMDIR /S /Q "!DENO_DIR!"
24+
)
25+
26+
PUSHD "!QUARTO_SRC_PATH!"
27+
28+
FOR %%E IN (quarto.ts vendor_deps.ts ..\tests\test-deps.ts ..\package\scripts\deno_std\deno_std.ts) DO (
29+
CALL !DENO_BIN_PATH! install --allow-all --no-config --entrypoint %%E --importmap="!QUARTO_SRC_PATH!\import_map.json"
30+
)
31+
32+
REM Return to the original directory
33+
POPD
34+
35+
36+
EXIT /B 0

0 commit comments

Comments
 (0)