Skip to content

Commit b293252

Browse files
committed
Merge branch 'main' into portal-merged
# Conflicts: # Sources/App/Core/SiteURL.swift
2 parents 79339fa + ed96316 commit b293252

File tree

207 files changed

+7326
-4904
lines changed

Some content is hidden

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

207 files changed

+7326
-4904
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.gitlab.com/finestructure/spi-base:1.1.0
1+
FROM registry.gitlab.com/finestructure/spi-base:1.1.1
22

33
# Install SPM build dependencies
44
RUN apt-get update && apt-get install -y curl git make unzip \

.env.development.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ DATABASE_PORT=6432
33
DATABASE_NAME=spi_dev
44
DATABASE_USERNAME=spi_dev
55
DATABASE_PASSWORD=xxx
6+
REDIS_HOST=localhost

.env.testing.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ DATABASE_PORT=5432
33
DATABASE_NAME=spi_test
44
DATABASE_USERNAME=spi_test
55
DATABASE_PASSWORD=xxx
6+
REDIS_HOST=localhost

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
name: Test
3030
runs-on: ubuntu-latest
3131
container:
32-
image: registry.gitlab.com/finestructure/spi-base:1.1.0
32+
image: registry.gitlab.com/finestructure/spi-base:1.1.1
3333
options: --privileged
3434
services:
3535
postgres:
@@ -60,6 +60,21 @@ jobs:
6060
DATABASE_HOST: postgres
6161
DATABASE_PORT: '5432'
6262

63+
release-build-linux:
64+
name: Release build
65+
runs-on: ubuntu-latest
66+
container:
67+
image: registry.gitlab.com/finestructure/spi-base:1.1.1
68+
options: --privileged
69+
steps:
70+
- name: GH Runner bug workaround
71+
run: sysctl -w vm.mmap_rnd_bits=28
72+
- name: Checkout code
73+
uses: actions/checkout@v4
74+
with: { 'fetch-depth': 0 }
75+
- name: Build release
76+
run: swift build -c release --static-swift-stdlib -Xlinker -ljemalloc
77+
6378
# test-macos:
6479
# name: Test macOS
6580
# runs-on: macOS-latest

.github/workflows/query-performance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
continue-on-error: true
3030
container:
31-
image: registry.gitlab.com/finestructure/spi-base:1.1.0
31+
image: registry.gitlab.com/finestructure/spi-base:1.1.1
3232
steps:
3333
- name: Checkout code
3434
uses: actions/checkout@v4

.gitlab-ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,13 @@ smoke-test:
176176
- spi-server-deploy
177177
script: |
178178
rester() {
179-
docker run --rm -t -e base_url="$SITE_URL" -e api_token="$api_token" -v $PWD:/host -w /host finestructure/rester:0.8.1 "$1"
179+
docker run --rm -t \
180+
-e base_url="$SITE_URL" \
181+
-e api_token="$api_token" \
182+
-e smoke_test_token="$SMOKE_TEST_TOKEN" \
183+
-v $PWD:/host \
184+
-w /host \
185+
finestructure/rester:0.8.1 "$1"
180186
}
181187
echo Testing with SITE_URL: ${SITE_URL}
182188
rester restfiles/smoke-test.restfile
@@ -190,7 +196,12 @@ doc-test:
190196
- spi-server-deploy
191197
script: |
192198
rester() {
193-
docker run --rm -t -e base_url="$SITE_URL" -v $PWD:/host -w /host finestructure/rester:0.8.1 "$1"
199+
docker run --rm -t \
200+
-e base_url="$SITE_URL" \
201+
-e smoke_test_token="$SMOKE_TEST_TOKEN" \
202+
-v $PWD:/host \
203+
-w /host \
204+
finestructure/rester:0.8.1 "$1"
194205
}
195206
echo Testing with SITE_URL: ${SITE_URL}
196207
rester restfiles/doc-test.restfile

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# ================================
1919
# Build image
2020
# ================================
21-
FROM registry.gitlab.com/finestructure/spi-base:1.1.0 as build
21+
FROM registry.gitlab.com/finestructure/spi-base:1.1.1 as build
2222

2323
# Set up a build area
2424
WORKDIR /build
@@ -61,7 +61,7 @@ RUN [ -d /build/Resources ] && { mv /build/Resources ./Resources && chmod -R a-w
6161
# ================================
6262
# Run image
6363
# ================================
64-
FROM registry.gitlab.com/finestructure/spi-base:1.1.0
64+
FROM registry.gitlab.com/finestructure/spi-base:1.1.1
6565

6666
# NB sas 2022-09-23: We're not using a dedicated `vapor` user to run the executable, because it
6767
# makes managing the data in the checkouts volume difficult. See

FrontEnd/docc.scss

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,8 @@ header.spi,
2222
footer.spi {
2323
position: sticky;
2424
width: 100%;
25-
font-family:
26-
-apple-system,
27-
BlinkMacSystemFont,
28-
'SF Hello',
29-
'Segoe UI',
30-
Roboto,
31-
'Helvetica Neue',
32-
Arial,
33-
sans-serif,
34-
'Apple Color Emoji',
35-
'Segoe UI Emoji' !important;
25+
font-family: -apple-system, BlinkMacSystemFont, 'SF Hello', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,
26+
'Apple Color Emoji', 'Segoe UI Emoji' !important;
3627
font-size: 16px;
3728
line-height: 1.4;
3829
color: var(--header-text);
@@ -191,9 +182,9 @@ header.spi {
191182
span.stable,
192183
span.beta,
193184
span.branch {
194-
padding-left: 18px;
185+
padding-left: 16px;
195186
font-weight: 600;
196-
background-position: top 2px left;
187+
background-position: center left;
197188
background-repeat: no-repeat;
198189
background-size: 14px;
199190
}
@@ -209,6 +200,22 @@ header.spi {
209200
span.branch {
210201
background-image: var(--image-branch);
211202
}
203+
204+
.reference {
205+
display: inline-flex;
206+
gap: 4px;
207+
align-items: center;
208+
justify-content: center;
209+
210+
.badge {
211+
padding: 2px 4px;
212+
font-size: 10px;
213+
text-align: center;
214+
color: var(--header-text);
215+
background-color: rgba(255, 255, 255, 20%);
216+
border-radius: 4px;
217+
}
218+
}
212219
}
213220

214221
footer.spi {

FrontEnd/scripts/debug_panel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ export class SPIDebugPanel extends HTMLElement {
7676
}
7777

7878
addCanonicalUrls() {
79-
const canonicalUrl = document.querySelector('link[rel="canonical"]').href
79+
const canonicalUrl = document.querySelector('link[rel="canonical"]')?.href
8080
const windowUrl = window.location.href
8181
const matchingCanonicalUrl = canonicalUrl === windowUrl
8282

83-
this.newTableRow('Canonical URL', canonicalUrl)
83+
this.newTableRow('Canonical URL', canonicalUrl ? canonicalUrl : 'Missing', canonicalUrl ? null : 'red')
8484
this.newTableRow('Window URL', windowUrl)
8585
this.newTableRow('Canonical Match', matchingCanonicalUrl, matchingCanonicalUrl ? 'green' : 'red')
8686
}

FrontEnd/styles/colors.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@
191191
--debug-console-background: var(--light-blue);
192192
--debug-console-border: var(--grey);
193193
--debug-console-button-hover: var(--light-grey);
194+
195+
--custom-collections-badge-background: var(--light-grey);
196+
--custom-collections-badge-text: var(--dark-grey);
194197
}
195198

196199
// Dark mode.
@@ -317,5 +320,8 @@
317320
--debug-console-background: var(--dark-blue);
318321
--debug-console-border: var(--light-grey);
319322
--debug-console-button-hover: var(--dark-grey);
323+
324+
--custom-collections-badge-background: var(--dark-grey);
325+
--custom-collections-badge-text: var(--light-grey);
320326
}
321327
}

0 commit comments

Comments
 (0)