Просмотр исходного кода

Merge branch 'reactify-admin/app-settings-stocks' into reactify-admin/enable-plugin-setting

yusuketk 6 лет назад
Родитель
Сommit
b5343f2494

+ 8 - 0
.github/workflows/build-rc.yml

@@ -14,6 +14,14 @@ jobs:
     steps:
     - uses: actions/checkout@v1
 
+    - name: Cache/Restore yarn cache
+      uses: actions/cache@v1
+      with:
+        path: /usr/local/share/.cache/yarn
+        key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
+        restore-keys: |
+          ${{ runner.os }}-yarn-${{ matrix.node-version }}-
+
     - name: Set up Docker Buildx
       uses: crazy-max/ghaction-docker-buildx@v1.0.4
 

+ 11 - 2
.github/workflows/build.yml

@@ -1,8 +1,9 @@
 name: Release Docker Images
 
 on:
-  release:
-    types: [published]
+  push:
+    tags:
+      - v3.*.*
 
 jobs:
 
@@ -22,6 +23,14 @@ jobs:
         [[ ${{ matrix.flavor }} = "nocdn" ]] && suffix="-nocdn" || suffix=""
         echo ::set-env name=SUFFIX::$suffix
 
+    - name: Cache/Restore yarn cache
+      uses: actions/cache@v1
+      with:
+        path: /usr/local/share/.cache/yarn
+        key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
+        restore-keys: |
+          ${{ runner.os }}-yarn-${{ matrix.node-version }}-
+
     - name: Set up Docker Buildx
       uses: crazy-max/ghaction-docker-buildx@v1.0.4
 

+ 4 - 5
.github/workflows/ci.yml

@@ -42,7 +42,7 @@ jobs:
     - name: Install dependencies
       if: steps.cache-dependencies.outputs.cache-hit != 'true'
       run: |
-        yarn add growi-plugin-lsx growi-plugin-pukiwiki-like-linker growi-plugin-attachment-refs react-images react-motion
+        yarn add growi-plugin-lsx growi-plugin-pukiwiki-like-linker growi-plugin-attachment-refs react-images@1.0.0 react-motion
     - name: Print dependencies
       run: |
         echo -n "node " && node -v
@@ -96,7 +96,7 @@ jobs:
     - name: Install dependencies
       if: steps.cache-dependencies.outputs.cache-hit != 'true'
       run: |
-        yarn add growi-plugin-lsx growi-plugin-pukiwiki-like-linker growi-plugin-attachment-refs react-images react-motion
+        yarn add growi-plugin-lsx growi-plugin-pukiwiki-like-linker growi-plugin-attachment-refs react-images@1.0.0 react-motion
     - name: Print dependencies
       run: |
         echo -n "node " && node -v
@@ -156,7 +156,7 @@ jobs:
     - name: Install dependencies
       if: steps.cache-dependencies.outputs.cache-hit != 'true'
       run: |
-        yarn add growi-plugin-lsx growi-plugin-pukiwiki-like-linker growi-plugin-attachment-refs react-images react-motion
+        yarn add growi-plugin-lsx growi-plugin-pukiwiki-like-linker growi-plugin-attachment-refs react-images@1.0.0 react-motion
     - name: Print dependencies
       run: |
         echo -n "node " && node -v
@@ -202,14 +202,13 @@ jobs:
     - name: Install dependencies
       run: |
         yarn add growi-plugin-lsx growi-plugin-pukiwiki-like-linker growi-plugin-attachment-refs
-        yarn add -D react-images react-motion
+        yarn add -D react-images@1.0.0 react-motion
     - name: Print dependencies
       run: |
         echo -n "node " && node -v
         echo -n "npm " && npm -v
         yarn list --depth=0
     - name: yarn build:prod
-      if: steps.cache-public.outputs.cache-hit != 'true'
       run: |
         yarn build:prod
     - name: yarn install --production

+ 1 - 1
.github/workflows/release.yml

@@ -35,7 +35,7 @@ jobs:
         git commit -am "Release v${{ env.RELEASE_VERSION }}"
         git tag -a v${{ env.RELEASE_VERSION }} -m "v${{ env.RELEASE_VERSION }}"
         git push --follow-tags origin $TMP_RELEASE_BRANCH
-        git push --delete origin ${{ env.TMP_RELEASE_BRANCH }}
+        git push --delete origin $TMP_RELEASE_BRANCH
 
     - name: Upload release notes
       uses: Roang-zero1/github-create-release-action@master

+ 7 - 1
CHANGES.md

@@ -1,10 +1,16 @@
 # CHANGES
 
-## 3.6.2-RC
+## 3.6.3-RC
+
+* 
+
+## 3.6.2
 
 * Improvement: Reactify admin pages (Customize)
 * Improvement: Ensure not to consider `[text|site](https://example.com]` as a row in the table
 * Improvement: Enter key behavior in markdown table
+* Fix: Pre-installed plugins in official docker image are not detected
+    * Introduced by 3.6.0
 * Fix: Emoji Autocomplete window does not float correctly
     * Introduced by 3.5.0
 

+ 1 - 1
app.json

@@ -27,7 +27,7 @@
     },
     "ADDITIONAL_PACKAGES": {
       "description": "Space-separated list of npm package names to install.",
-      "value": "growi-plugin-lsx growi-plugin-pukiwiki-like-linker growi-plugin-attachment-refs react-images react-motion",
+      "value": "growi-plugin-lsx growi-plugin-pukiwiki-like-linker growi-plugin-attachment-refs react-images@1.0.0 react-motion",
       "required": false
     }
   },

+ 12 - 11
docker/Dockerfile

@@ -25,7 +25,7 @@ RUN --mount=type=cache,target=/usr/local/share/.cache/yarn \
   yarn add growi-plugin-lsx growi-plugin-pukiwiki-like-linker growi-plugin-attachment-refs
 # install peerDependencies
 RUN --mount=type=cache,target=/usr/local/share/.cache/yarn \
-  yarn add -D react-images react-motion
+  yarn add -D react-images@1.0.0 react-motion
 
 
 
@@ -48,8 +48,15 @@ LABEL maintainer Yuki Takei <yuki@weseek.co.jp>
 
 ENV appDir /opt/growi
 
+COPY --from=deps-resolver ${appDir}/node_modules ${appDir}/node_modules
+
+# copy all files except the files listed in Dockerfile.dockerignore
 COPY . ${appDir}
 
+# overwirte package.json and yarn.lock
+COPY --from=deps-resolver ${appDir}/package.json ${appDir}/package.json
+COPY --from=deps-resolver ${appDir}/yarn.lock ${appDir}/yarn.lock
+
 
 
 ##
@@ -62,24 +69,18 @@ COPY docker/nocdn/env.prod.js ${appDir}/config/
 
 
 
-##
-## prebuilder (alias)
-##
-FROM prebuilder-${flavor} AS prebuilder
-
-
-
 ##
 ## builder
 ##
-FROM deps-resolver AS builder
+FROM prebuilder-${flavor} AS builder
 
 ENV appDir /opt/growi
 
-COPY --from=prebuilder ${appDir} ${appDir}
+WORKDIR ${appDir}
 
 # build
-RUN yarn build:prod
+RUN --mount=type=cache,target=./node_modules/.cache \
+  yarn build:prod
 
 # remove except artifacts
 WORKDIR /tmp

+ 0 - 1
docker/Dockerfile.dockerignore

@@ -11,4 +11,3 @@ src/test
 .stylelint*
 app.json
 Procfile
-wercker.yml

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "growi",
-  "version": "3.6.2-RC",
+  "version": "3.6.3-RC",
   "description": "Team collaboration software using markdown",
   "tags": [
     "wiki",

+ 4 - 8
src/server/routes/apiv3/customize-setting.js

@@ -130,14 +130,10 @@ module.exports = (crowi) => {
    *            content:
    *              application/json:
    *                schema:
-   *                  $ref: '#/components/schemas/CustomizeLayoutTheme'
-   *                  $ref: '#/components/schemas/CustomizeBehavior'
-   *                  $ref: '#/components/schemas/CustomizeFunction'
-   *                  $ref: '#/components/schemas/CustomizeHighlight'
-   *                  $ref: '#/components/schemas/CustomizeTitle'
-   *                  $ref: '#/components/schemas/CustomizeHeader'
-   *                  $ref: '#/components/schemas/CustomizeCss'
-   *                  $ref: '#/components/schemas/CustomizeScript'
+   *                  properties:
+   *                    customizeParams:
+   *                      type: object
+   *                      description: customize params
    */
   router.get('/', loginRequiredStrictly, adminRequired, async(req, res) => {
 

+ 3 - 4
src/server/routes/apiv3/markdown-setting.js

@@ -100,10 +100,9 @@ module.exports = (crowi) => {
    *              application/json:
    *                schema:
    *                  properties:
-   *                    markdonwParams:
-   *                      $ref: '#/components/schemas/LineBreakParams'
-   *                      $ref: '#/components/schemas/PresentationParams'
-   *                      $ref: '#/components/schemas/XssParams'
+   *                    markdownParams:
+   *                      type: object
+   *                      description: markdown params
    */
   router.get('/', loginRequiredStrictly, adminRequired, async(req, res) => {
     const markdownParams = {