Skip to content

Commit 5d30579

Browse files
authored
Merge branch 'main' into fix/mono-color-options
2 parents 13af391 + f6b86d1 commit 5d30579

File tree

2,336 files changed

+398543
-314009
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,336 files changed

+398543
-314009
lines changed

.github/DISCUSSION_TEMPLATE/q-a.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ body:
2828
print("Hello, world!")
2929
```
3030
31-
![A placeholder image](https://placehold.co/600x400.png)
31+
![An image]({{< placeholder 600 400 >}}){#fig-placeholder}
32+
33+
{{< lipsum 1 >}}
34+
35+
A reference to @fig-placeholder.
3236
3337
The end.
3438
````
@@ -49,16 +53,31 @@ body:
4953
placeholder: |
5054
You can include Quarto document code which includes code blocks like this:
5155
56+
`````md
5257
````qmd
5358
---
54-
title: "Hello Quarto!"
59+
title: "Reproducible Quarto Document"
5560
format: html
61+
engine: jupyter
5662
---
5763
58-
```py
59-
print("Hello Quarto!")
64+
This is a reproducible Quarto document using `format: html`.
65+
It is written in Markdown and contains embedded Python code.
66+
When you run the code, it will produce a message.
67+
68+
```{python}
69+
print("Hello, world!")
6070
```
71+
72+
![An image]({{< placeholder 600 400 >}}){#fig-placeholder}
73+
74+
{{< lipsum 1 >}}
75+
76+
A reference to @fig-placeholder.
77+
78+
The end.
6179
````
80+
`````
6281
6382
---
6483

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ body:
77
attributes:
88
value: |
99
Welcome to the quarto GitHub repository!
10-
1110
We are always happy to hear feedback from our users.
1211
12+
This is the repository for the command-line program `quarto`:
13+
14+
- If you're reporting an issue with the VS Code extension, please visit https://github.com/quarto-dev/quarto
15+
- If you're reporting an issue inside RStudio, please visit https://github.com/rstudio/rstudio
16+
1317
Quarto is under active development!
1418
If convenient, we'd appreciate if you could check that the issue persists on the [latest pre-release](https://github.com/quarto-dev/quarto-cli/releases).
1519
@@ -20,6 +24,35 @@ body:
2024
2125
Thank you for using Quarto!
2226
27+
---
28+
29+
You can share a Quarto document using the following syntax, _i.e._, using more backticks than you have in your document (usually four ` ```` `).
30+
For example with Quarto CLI >=1.5:
31+
32+
````qmd
33+
---
34+
title: "Reproducible Quarto Document"
35+
format: html
36+
engine: jupyter
37+
---
38+
39+
This is a reproducible Quarto document using `format: html`.
40+
It is written in Markdown and contains embedded Python code.
41+
When you run the code, it will produce a message.
42+
43+
```{python}
44+
print("Hello, world!")
45+
```
46+
47+
![An image]({{< placeholder 600 400 >}}){#fig-placeholder}
48+
49+
{{< lipsum 1 >}}
50+
51+
A reference to @fig-placeholder.
52+
53+
The end.
54+
````
55+
2356
- type: textarea
2457
attributes:
2558
label: Bug description
@@ -35,22 +68,31 @@ body:
3568
placeholder: |
3669
You can share a Quarto document using the following syntax, _i.e._, using more backticks than you have in your document (usually four ` ```` `).
3770
71+
`````md
3872
````qmd
3973
---
4074
title: "Reproducible Quarto Document"
4175
format: html
76+
engine: jupyter
4277
---
4378
4479
This is a reproducible Quarto document using `format: html`.
45-
It is written in Markdown and contains embedded R code.
46-
When you run the code, it will produce a plot.
80+
It is written in Markdown and contains embedded Python code.
81+
When you run the code, it will produce a message.
4782
48-
```{r}
49-
plot(cars)
83+
```{python}
84+
print("Hello, world!")
5085
```
5186
87+
![An image]({{< placeholder 600 400 >}}){#fig-placeholder}
88+
89+
{{< lipsum 1 >}}
90+
91+
A reference to @fig-placeholder.
92+
5293
The end.
5394
````
95+
`````
5496
5597
- type: textarea
5698
attributes:
@@ -80,7 +122,9 @@ body:
80122
```bash
81123
quarto check
82124
```
83-
125+
validations:
126+
required: true
127+
84128
- type: markdown
85129
attributes:
86130
value: "_Thanks for submitting this bug report!_"

.github/actions/cache-typst/action.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
name: "Cache Typst package"
1+
name: "Restore any Typst package cache"
22
description: "Configures the caching for Typst packages"
3+
outputs:
4+
cache-hit:
5+
description: "Was a cache found with primary key ?"
6+
value: ${{ steps.cache-typst-restore.outputs.cache-hit }}
7+
cache-primary-key:
8+
description: "Key of the cache to find and save"
9+
value: ${{ steps.cache-typst-restore.outputs.cache-primary-key }}
10+
cache-matched-key:
11+
description: "Key of the cache found and used."
12+
value: ${{ steps.cache-typst-restore.outputs.cache-primary-key }}
13+
cache-path:
14+
description: "where is the packages cache for typst ?"
15+
value: ${{ steps.cache-typst-path.outputs.TYPST_CACHE }}
316

417
runs:
518
using: "composite"
619
steps:
720
- name: Typst Cache path
21+
id: cache-typst-path
822
run: |
923
case $RUNNER_OS in
1024
"Linux")
@@ -21,12 +35,14 @@ runs:
2135
exit 1
2236
;;
2337
esac
38+
echo "TYPST_CACHE=${TYPST_CACHE}" >> $GITHUB_OUTPUT
2439
shell: bash
2540

2641
- name: Cache Typst package folder
27-
uses: actions/cache@v3
42+
id: cache-typst-restore
43+
uses: actions/cache/restore@v4
2844
with:
2945
path: ${{ env.TYPST_CACHE }}
30-
key: ${{ runner.os }}-typst-1-${{ github.run_id }}
46+
key: ${{ runner.os }}-typst-1
3147
restore-keys: |
32-
${{ runner.os }}-typst-1-
48+
${{ runner.os }}-typst-

.github/pull_request_template.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ I have (if applicable):
2424

2525
- [ ] filed a [contributor agreement](https://github.com/quarto-dev/quarto-cli/blob/main/CONTRIBUTING.md).
2626
- [ ] referenced the GitHub issue this PR closes
27-
- [ ] updated the appropriate changelog
27+
- [ ] updated the appropriate changelog in the PR
28+
- [ ] ensured the present test suite passes
29+
- [ ] added new tests
30+
- [ ] created a separate documentation PR in [Quarto's website repo](https://github.com/quarto-dev/quarto-web/) and linked it to this PR

.github/workflows/actions/quarto-dev/action.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ runs:
55
using: "composite"
66
steps:
77
- name: Cache deno std deps
8-
uses: actions/cache@v3
8+
uses: actions/cache@v4
99
with:
1010
path: ./src/resources/deno_std/cache
1111
key: ${{ runner.os }}-deno_std-1-${{ hashFiles('./src/resources/deno_std/deno_std.lock', './package/scripts/deno_std/deno_std.ts') }}
@@ -42,14 +42,32 @@ runs:
4242
echo "Unexpected package/dist/share path detected: $(quarto --paths)"
4343
Exit 1
4444
}
45-
If ( "$(git status --porcelain)" -ne "" ) {
46-
echo "Uncommitted changes detected:"
47-
git status --porcelain
48-
Exit 1
45+
# check if configure is modifying some files as it should not
46+
$modifiedFiles = git diff --name-only
47+
If ($modifiedFiles -ne "") {
48+
49+
# Convert the list to an array
50+
$modifiedFilesArray = $modifiedFiles -split "`n" | ForEach-Object { $_.Trim() }
51+
52+
If ($modifiedFilesArray -contains "tests/uv.lock") {
53+
Write-Output "::warning::test/uv.lock has been modified."
54+
$modifiedFilesArray = $modifiedFilesArray | Where-Object { $_ -notmatch "uv.lock" }
55+
}
56+
57+
# Count the number of modified files
58+
$modifiedFilesCount = $modifiedFilesArray.Count
59+
60+
If ($modifiedFilesCount -ge 1) {
61+
Write-Output "::error::Uncommitted changes detected."
62+
foreach ($file in $modifiedFilesArray) {
63+
Write-Output $file
64+
}
65+
Exit 1
66+
}
4967
}
5068
5169
- name: Quarto Check
52-
if: runner.debug == '1'
70+
if: runner.debug == '1'
5371
working-directory: tests
5472
shell: pwsh
5573
run: quarto check
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: "Signing file"
2+
description: "Install and configure the environment to then do the signing of files."
3+
inputs:
4+
paths:
5+
description: "Paths to sign"
6+
required: true
7+
signtools-extra-args:
8+
description: "Additionnal arguments to pass to signtool"
9+
outputs:
10+
cert_path:
11+
description: "certificate path"
12+
value: ${{ steps.setup-cert.outputs.SM_CLIENT_CERT_FILE }}
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Setup for SMCTL authentication
18+
id: setup-cert
19+
shell: pwsh
20+
run: |
21+
Write-Output "::group::Check for required environment variable"
22+
if (-not $env:SM_CLIENT_CERT_FILE_B64) {
23+
Write-Output "::error title=Environment Variable Error::SM_CLIENT_CERT_FILE_B64 is not set"
24+
exit 1
25+
} else {
26+
Write-Output "SM_CLIENT_CERT_FILE_B64 is set correctly"
27+
}
28+
Write-Output "::endgroup::"
29+
Write-Output "::group::Retrieve client certificate for auth"
30+
if (!(Test-Path ".\.build\certificates\codesign.pfx")) {
31+
# Get certificates
32+
New-Item -ItemType Directory -Force -Path .\.build\certificates
33+
Set-Content -Path ".\.build\certificates\codesign.txt" -Value $env:SM_CLIENT_CERT_FILE_B64
34+
& certutil -decode ".\.build\certificates\codesign.txt" ".\.build\certificates\codesign.pfx"
35+
} else {
36+
Write-Output "Certificate already exists"
37+
}
38+
# Configure environment for next step
39+
"SM_CLIENT_CERT_FILE=.\.build\certificates\codesign.pfx" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
40+
Write-Output "::endgroup::"
41+
42+
- name: Install SMCTL
43+
shell: pwsh
44+
run: |
45+
Write-Output "::group::Install smctl if needed"
46+
if (!(Get-Command smctl -ErrorAction SilentlyContinue)) {
47+
curl -o smtools-windows-x64.msi "https://rstudio-buildtools.s3.amazonaws.com/posit-dev/smtools-windows-x64.msi"
48+
msiexec /i smtools-windows-x64.msi /quiet /qn /log smtools-windows-x64.log
49+
"C:/Program Files/DigiCert/DigiCert One Signing Manager Tools" | Out-File -FilePath $env:GITHUB_PATH -Append
50+
Write-Output "SMCTL installed and added on PATH"
51+
} else {
52+
Write-Output "SMCTL already installed and on PATH"
53+
}
54+
Write-Output "::endgroup::"
55+
Write-Output "::group::Add signtools in PATH"
56+
if (!(Get-Command signtool -ErrorAction SilentlyContinue)) {
57+
"C:/Program Files (x86)/Windows Kits/10/App Certification Kit" | Out-File -FilePath $env:GITHUB_PATH -Append
58+
Write-Output "signtool added on PATH"
59+
} else {
60+
Write-Output "signtool already installed and on PATH"
61+
}
62+
Write-Output "::endgroup::"
63+
64+
- name: Sign files with signtool
65+
shell: pwsh
66+
env:
67+
SM_CLIENT_CERT_FILE: ${{ steps.setup-cert.outputs.SM_CLIENT_CERT_FILE }}
68+
run: |
69+
Write-Output "::group::Check for required environment variables"
70+
$requiredEnvVars = @('SM_HOST', 'SM_API_KEY', 'SM_CLIENT_CERT_FILE', 'SM_CLIENT_CERT_PASSWORD', 'CERT_FINGERPRINT')
71+
foreach ($envVar in $requiredEnvVars) {
72+
if (-not $(Get-Item -Path "Env:$envVar" -ErrorAction SilentlyContinue)) {
73+
Write-Output "::error title=Missing environment variable::Environment variable $envVar is not set."
74+
exit 1
75+
}
76+
Write-Output "All env var correctly set."
77+
}
78+
Write-Output "::endgroup::"
79+
Write-Output "::group::Sync certificates"
80+
smctl windows certsync
81+
Write-Output "::endgroup::"
82+
# Sign each file that will be bundled in the installer
83+
$paths = "${{ inputs.paths }}" -split "`n" | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne "" }
84+
foreach ($path in $paths) {
85+
Write-Output "::group::Signing ${path}"
86+
signtool.exe sign /sha1 $env:CERT_FINGERPRINT /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 ${{ inputs.signtools-extra-args }} $path
87+
if ($LASTEXITCODE -ne 0) {
88+
Write-Output "::error title=Signing error::Error while signing ${path}"
89+
exit 1
90+
}
91+
signtool.exe verify /v /pa $path
92+
if ($LASTEXITCODE -ne 0) {
93+
Write-Output "::error title=Verify signature error::Error while verifying ${path}"
94+
exit 1
95+
}
96+
Write-Output "::endgroup::"
97+
}

0 commit comments

Comments
 (0)