-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforgit.bat
More file actions
68 lines (57 loc) · 1.46 KB
/
forgit.bat
File metadata and controls
68 lines (57 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
@echo off
REM Handle the commit message
SET msg="minor change"
IF NOT [%1] == [] SET msg=%1
set "QUARTO=C:\Program Files\Quarto\bin\quarto.exe"
REM dont use quarto.cmd, that is broken. that is also why just quarto works, windows finds .exe first
set "QUARTO_DENO=C:\Program Files\Quarto\bin\tools\x86_64\deno.exe"
echo %msg%
REM Check if the second argument is "dopy"
IF [%2] == [dopy] (
echo "Dopy mode activated"
pushd ..\py_m2b3
call python Generate.py
copy members_en.qmd ..\m2b3en\members.qmd
copy members_fr.qmd ..\fr\members.qmd
IF [%3] == [dogit] (
git add -A
git commit -m %msg%
git push
)
popd
)
echo "hello"
echo "now doing quarto"
call "%QUARTO%" render
REM call "C:\Program Files\Quarto\bin\quarto.cmd" render
REM call quarto render
REM Check if the third argument is "dogit"
REM Also check if the second argument is "dogit" if the second is missing
IF [%3] == [dogit] (
git add -A
git commit -m %msg%
git push
) ELSE IF [%2] == [dogit] (
git add -A
git commit -m %msg%
git push
) ELSE (
echo "Skipping Git operations in main directory"
)
cd ../fr
call "%QUARTO%" render
REM call quarto.cmd render
REM call "C:\Program Files\Quarto\bin\quarto.cmd" render
REM call quarto render
IF [%3] == [dogit] (
git add -A
git commit -m %msg%
git push
) ELSE IF [%2] == [dogit] (
git add -A
git commit -m %msg%
git push
) ELSE (
echo "Skipping Git operations in ../fr directory"
)
cd ../m2b3en