Skip to content

Commit 75c392f

Browse files
authored
Merge pull request #593 from api-platform/staging
2 parents 8172dcc + 35ae157 commit 75c392f

9 files changed

+392
-9
lines changed

docker-compose.override.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.4"
2-
31
# Development environment override
42
services:
53
php:

docker-compose.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.4"
2-
31
services:
42
php:
53
image: ${IMAGES_PREFIX:-}app-php

pwa/Dockerfile

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ RUN apk add --no-cache libc6-compat bash git
77

88
WORKDIR /srv/app
99

10-
RUN corepack enable && \
10+
RUN npm install --global corepack@latest && \
11+
corepack enable && \
1112
corepack prepare --activate pnpm@latest && \
1213
pnpm config -g set store-dir /.pnpm-store
1314

@@ -18,6 +19,8 @@ RUN corepack enable && \
1819

1920
FROM php as php_documentation_generator
2021

22+
ENV COMPOSER_ALLOW_SUPERUSER=1
23+
2124
RUN apt-get update && apt-get install -y gnupg git libzip-dev zip
2225
COPY --from=composer /usr/bin/composer /usr/bin/composer
2326
# this is used to preload data see phpwasm
@@ -79,7 +82,7 @@ RUN --mount=type=secret,id=GITHUB_KEY \
7982
if [ -z "$GITHUB_KEY" ]; then \
8083
echo "Please set the GITHUB_KEY secret" && exit 1 ; \
8184
fi \
82-
&& pnpm run prebuild
85+
&& npm i ts-node && npm run prebuild
8386

8487
# ADD https://soyuka.me/contributors.json ./data/contributors.json
8588

@@ -95,7 +98,7 @@ RUN --mount=type=secret,id=GITHUB_KEY \
9598
if [ -z "$GITHUB_KEY" ]; then \
9699
echo "Please set the GITHUB_KEY secret" && exit 1 ; \
97100
fi \
98-
&& pnpm run postbuild
101+
&& npm i ts-node && npm run postbuild
99102

100103
# Production image, copy all the files and run next
101104
FROM node:18-alpine AS prod

pwa/consts.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const versions = [
2+
"4.1",
23
"4.0",
34
"3.4",
45
"3.3",
@@ -15,6 +16,6 @@ export const versions = [
1516
"main",
1617
];
1718

18-
export const refVersions: string[] = ["4.0", "3.4", "3.3", "3.2", "main"];
19+
export const refVersions: string[] = ["4.1", "4.0", "3.4", "3.3", "3.2", "main"];
1920

20-
export const current = "4.0";
21+
export const current = "4.1";

pwa/contributors.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { getAllContributors } from "./api/contributorsRank";
2+
const fs = require("fs");
3+
const path = require("path");
4+
5+
async function getContributors() {
6+
const allContributors = await getAllContributors();
7+
fs.writeFileSync(
8+
path.join(process.cwd(), "data/contributors.json"),
9+
JSON.stringify(allContributors, null, 2),
10+
"utf-8"
11+
);
12+
}
13+
14+
getContributors();

pwa/docs-versions.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
4.1
12
4.0
23
3.4
34
3.3

pwa/pnpm-lock.yaml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pwa/postbuild.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const cpr = require("cpr");
2+
const path = require("path");
3+
4+
cpr(path.join(__dirname, 'node_modules/shiki/themes'), path.join(__dirname, '.next/standalone/node_modules/shiki/themes'), function(err: any, files: any) {
5+
err && console.error(err)
6+
});
7+
8+
cpr(path.join(__dirname, 'node_modules/shiki/languages'), path.join(__dirname, '.next/standalone/node_modules/shiki/languages'), function(err: any, files: any) {
9+
err && console.error(err)
10+
});
11+

0 commit comments

Comments
 (0)