aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-09-10 15:27:06 +0530
committerLibravatar GitHub <noreply@github.com>2021-09-10 15:27:06 +0530
commitffbd18238f0e2f26e3cbef299b9d65368f72ad78 (patch)
treec51efa3627996613f86fd3acd340c77431629839
parentchore: preconditions for node 16 (#1904) (diff)
downloadferdium-app-ffbd18238f0e2f26e3cbef299b9d65368f72ad78.tar.gz
ferdium-app-ffbd18238f0e2f26e3cbef299b9d65368f72ad78.tar.zst
ferdium-app-ffbd18238f0e2f26e3cbef299b9d65368f72ad78.zip
fix: 'recipes' (using 'pnpm') will coexist with 'ferdi' (using 'npm') (#1905)
backported from https://github.com/getferdi/ferdi/pull/1826 Co-authored-by: Markus Hatvan <markus_hatvan@aon.at>
-rw-r--r--.github/workflows/dependency-updates.yml13
-rw-r--r--.github/workflows/ferdi-builds.yml45
-rw-r--r--CONTRIBUTING.md3
3 files changed, 57 insertions, 4 deletions
diff --git a/.github/workflows/dependency-updates.yml b/.github/workflows/dependency-updates.yml
index 5d7d64efc..aa3fe6d39 100644
--- a/.github/workflows/dependency-updates.yml
+++ b/.github/workflows/dependency-updates.yml
@@ -22,6 +22,7 @@ jobs:
22 - name: Set env vars 22 - name: Set env vars
23 run: | 23 run: |
24 echo "NPM_CACHE=$HOME/.npm" >> $GITHUB_ENV 24 echo "NPM_CACHE=$HOME/.npm" >> $GITHUB_ENV
25 echo "PNPM_CACHE=$HOME/.pnpm-store" >> $GITHUB_ENV
25 - name: Checkout code along with submodules 26 - name: Checkout code along with submodules
26 uses: actions/checkout@v2 27 uses: actions/checkout@v2
27 with: 28 with:
@@ -40,10 +41,22 @@ jobs:
40 restore-keys: | 41 restore-keys: |
41 ${{ runner.os }}-14.17-build-${{ env.cache-name }}- 42 ${{ runner.os }}-14.17-build-${{ env.cache-name }}-
42 ${{ runner.os }}-14.17-build- 43 ${{ runner.os }}-14.17-build-
44 - name: Cache .pnpm-store
45 uses: actions/cache@v2
46 env:
47 cache-name: cache-pnpm-store
48 with:
49 path: ${{ env.PNPM_CACHE }}
50 key: ${{ runner.os }}-14.17-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
43 - name: Use Node.js 14.17.6 51 - name: Use Node.js 14.17.6
44 uses: actions/setup-node@v2 52 uses: actions/setup-node@v2
45 with: 53 with:
46 node-version: 14.17.6 54 node-version: 14.17.6
55 - name: Install pnpm
56 uses: pnpm/action-setup@v2.0.1
57 with:
58 version: 6.14.7
59 run_install: true
47 - name: Uninstall locally and reinstall global npm modules 60 - name: Uninstall locally and reinstall global npm modules
48 run: | 61 run: |
49 npm uninstall node-gyp 62 npm uninstall node-gyp
diff --git a/.github/workflows/ferdi-builds.yml b/.github/workflows/ferdi-builds.yml
index c1312fb92..820725a1d 100644
--- a/.github/workflows/ferdi-builds.yml
+++ b/.github/workflows/ferdi-builds.yml
@@ -88,6 +88,7 @@ jobs:
88 - name: Set env vars 88 - name: Set env vars
89 run: | 89 run: |
90 echo "NPM_CACHE=$HOME/.npm" >> $GITHUB_ENV 90 echo "NPM_CACHE=$HOME/.npm" >> $GITHUB_ENV
91 echo "PNPM_CACHE=$HOME/.pnpm-store" >> $GITHUB_ENV
91 echo "ELECTRON_CACHE=$HOME/.cache/electron" >> $GITHUB_ENV 92 echo "ELECTRON_CACHE=$HOME/.cache/electron" >> $GITHUB_ENV
92 echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV 93 echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV
93 echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV 94 echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV
@@ -116,6 +117,13 @@ jobs:
116 restore-keys: | 117 restore-keys: |
117 ${{ runner.os }}-14.17-build-${{ env.cache-name }}- 118 ${{ runner.os }}-14.17-build-${{ env.cache-name }}-
118 ${{ runner.os }}-14.17-build- 119 ${{ runner.os }}-14.17-build-
120 - name: Cache .pnpm-store
121 uses: actions/cache@v2
122 env:
123 cache-name: cache-pnpm-store
124 with:
125 path: ${{ env.PNPM_CACHE }}
126 key: ${{ runner.os }}-14.17-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
119 - name: Cache electron modules 127 - name: Cache electron modules
120 uses: actions/cache@v2 128 uses: actions/cache@v2
121 env: 129 env:
@@ -138,6 +146,11 @@ jobs:
138 run: | 146 run: |
139 sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/* 147 sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
140 sudo xcode-select -s "/Applications/Xcode_12.4.app" 148 sudo xcode-select -s "/Applications/Xcode_12.4.app"
149 - name: Install pnpm
150 uses: pnpm/action-setup@v2.0.1
151 with:
152 version: 6.14.7
153 run_install: true
141 - name: Uninstall locally and reinstall global npm modules 154 - name: Uninstall locally and reinstall global npm modules
142 run: | 155 run: |
143 npm uninstall node-gyp 156 npm uninstall node-gyp
@@ -148,7 +161,7 @@ jobs:
148 - name: Install node dependencies recursively 161 - name: Install node dependencies recursively
149 run: npx lerna bootstrap 162 run: npx lerna bootstrap
150 - name: Package recipes 163 - name: Package recipes
151 run: npm i && npm run package 164 run: pnpm i && pnpm run package
152 working-directory: ./recipes 165 working-directory: ./recipes
153 - name: Run linter and tests 166 - name: Run linter and tests
154 run: npm run lint && npm run test 167 run: npm run lint && npm run test
@@ -186,6 +199,7 @@ jobs:
186 - name: Set env vars 199 - name: Set env vars
187 run: | 200 run: |
188 echo "NPM_CACHE=$HOME/.npm" >> $GITHUB_ENV 201 echo "NPM_CACHE=$HOME/.npm" >> $GITHUB_ENV
202 echo "PNPM_CACHE=$HOME/.pnpm-store" >> $GITHUB_ENV
189 echo "ELECTRON_CACHE=$HOME/.cache/electron" >> $GITHUB_ENV 203 echo "ELECTRON_CACHE=$HOME/.cache/electron" >> $GITHUB_ENV
190 echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV 204 echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV
191 echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV 205 echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV
@@ -214,6 +228,13 @@ jobs:
214 restore-keys: | 228 restore-keys: |
215 ${{ runner.os }}-14.17-build-${{ env.cache-name }}- 229 ${{ runner.os }}-14.17-build-${{ env.cache-name }}-
216 ${{ runner.os }}-14.17-build- 230 ${{ runner.os }}-14.17-build-
231 - name: Cache .pnpm-store
232 uses: actions/cache@v2
233 env:
234 cache-name: cache-pnpm-store
235 with:
236 path: ${{ env.PNPM_CACHE }}
237 key: ${{ runner.os }}-14.17-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
217 - name: Cache electron modules 238 - name: Cache electron modules
218 uses: actions/cache@v2 239 uses: actions/cache@v2
219 env: 240 env:
@@ -232,6 +253,11 @@ jobs:
232 uses: actions/setup-node@v2 253 uses: actions/setup-node@v2
233 with: 254 with:
234 node-version: 14.17.6 255 node-version: 14.17.6
256 - name: Install pnpm
257 uses: pnpm/action-setup@v2.0.1
258 with:
259 version: 6.14.7
260 run_install: true
235 - name: Uninstall locally and reinstall global npm modules 261 - name: Uninstall locally and reinstall global npm modules
236 run: | 262 run: |
237 npm uninstall node-gyp 263 npm uninstall node-gyp
@@ -245,7 +271,7 @@ jobs:
245 run: echo "PACKAGE_VERSION=$(node -p 'require("./package.json").version')" >> $GITHUB_ENV 271 run: echo "PACKAGE_VERSION=$(node -p 'require("./package.json").version')" >> $GITHUB_ENV
246 shell: bash 272 shell: bash
247 - name: Package recipes 273 - name: Package recipes
248 run: npm i && npm run package 274 run: pnpm i && pnpm run package
249 working-directory: ./recipes 275 working-directory: ./recipes
250 - name: Run linter and tests 276 - name: Run linter and tests
251 run: npm run lint && npm run test 277 run: npm run lint && npm run test
@@ -300,6 +326,7 @@ jobs:
300 run: | 326 run: |
301 echo "HOME=$USERPROFILE" >> $GITHUB_ENV 327 echo "HOME=$USERPROFILE" >> $GITHUB_ENV
302 echo "NPM_CACHE=$USERPROFILE\.npm" >> $GITHUB_ENV 328 echo "NPM_CACHE=$USERPROFILE\.npm" >> $GITHUB_ENV
329 echo "PNPM_CACHE=$USERPROFILE\.pnpm-store" >> $GITHUB_ENV
303 echo "ELECTRON_CACHE=$USERPROFILE\.cache\electron" >> $GITHUB_ENV 330 echo "ELECTRON_CACHE=$USERPROFILE\.cache\electron" >> $GITHUB_ENV
304 echo "ELECTRON_BUILDER_CACHE=$USERPROFILE\.cache\electron-builder" >> $GITHUB_ENV 331 echo "ELECTRON_BUILDER_CACHE=$USERPROFILE\.cache\electron-builder" >> $GITHUB_ENV
305 echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV 332 echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV
@@ -329,6 +356,13 @@ jobs:
329 restore-keys: | 356 restore-keys: |
330 ${{ runner.os }}-14.17-build-${{ env.cache-name }}- 357 ${{ runner.os }}-14.17-build-${{ env.cache-name }}-
331 ${{ runner.os }}-14.17-build- 358 ${{ runner.os }}-14.17-build-
359 - name: Cache .pnpm-store
360 uses: actions/cache@v2
361 env:
362 cache-name: cache-pnpm-store
363 with:
364 path: ${{ env.PNPM_CACHE }}
365 key: ${{ runner.os }}-14.17-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
332 - name: Cache electron modules 366 - name: Cache electron modules
333 uses: actions/cache@v2 367 uses: actions/cache@v2
334 env: 368 env:
@@ -347,6 +381,11 @@ jobs:
347 uses: actions/setup-node@v2 381 uses: actions/setup-node@v2
348 with: 382 with:
349 node-version: 14.17.6 383 node-version: 14.17.6
384 - name: Install pnpm
385 uses: pnpm/action-setup@v2.0.1
386 with:
387 version: 6.14.7
388 run_install: true
350 - name: Uninstall locally and reinstall global npm modules 389 - name: Uninstall locally and reinstall global npm modules
351 run: | 390 run: |
352 npm uninstall node-gyp 391 npm uninstall node-gyp
@@ -360,7 +399,7 @@ jobs:
360 run: npx lerna bootstrap 399 run: npx lerna bootstrap
361 shell: bash 400 shell: bash
362 - name: Package recipes 401 - name: Package recipes
363 run: npm i && npm run package 402 run: pnpm i && pnpm run package
364 working-directory: ./recipes 403 working-directory: ./recipes
365 shell: bash 404 shell: bash
366 - name: Run linter and tests 405 - name: Run linter and tests
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9cdef1f35..5c49a977c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -37,6 +37,7 @@
37 - [Update the code](#update-the-code) 37 - [Update the code](#update-the-code)
38 - [Update Node.js and npm](#update-nodejs-and-npm) 38 - [Update Node.js and npm](#update-nodejs-and-npm)
39 - [Update dependences](#update-dependences) 39 - [Update dependences](#update-dependences)
40
40<!-- /TOC --> 41<!-- /TOC -->
41 42
42## Code of Conduct 43## Code of Conduct
@@ -150,7 +151,7 @@ npm run build
150Ferdi requires its recipes to be packaged before it can use it. When running Ferdi as a development instance, you'll need to package the local recipes before you can create any services inside Ferdi. 151Ferdi requires its recipes to be packaged before it can use it. When running Ferdi as a development instance, you'll need to package the local recipes before you can create any services inside Ferdi.
151 152
152```bash 153```bash
153cd recipes && npm i && npm run package 154cd recipes && pnpm i && pnpm run package
154``` 155```
155 156
156### Using Docker to build a linux-targetted packaged app 157### Using Docker to build a linux-targetted packaged app