Prechádzať zdrojové kódy

Specify node version

n1474335 4 rokov pred
rodič
commit
e16ce1d9c2
3 zmenil súbory, kde vykonal 8 pridanie a 2 odobranie
  1. 5 1
      .github/workflows/main.yml
  2. 1 1
      package.json
  3. 2 0
      postinstall.sh

+ 5 - 1
.github/workflows/main.yml

@@ -12,9 +12,13 @@ jobs:
     
     steps:
     - uses: actions/checkout@v2
+    - name: Use Node.js
+      uses: actions/setup-node@v1
+      with:
+        node-version: '10.x'
     - name: Setup
       run: |
-        npm i
+        npm install
         export NODE_OPTIONS=--max_old_space_size=2048
     - name: Lint
       run: npx grunt lint

+ 1 - 1
package.json

@@ -172,7 +172,7 @@
     "testui": "grunt testui",
     "testuidev": "npx nightwatch --env=dev",
     "lint": "grunt lint",
-    "postinstall": "sh postinstall.sh",
+    "postinstall": "bash postinstall.sh",
     "newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs"
   }
 }

+ 2 - 0
postinstall.sh

@@ -1,3 +1,5 @@
+#!/bin/bash
+
 # Add file extensions to Crypto-Api imports
 if [[ "$OSTYPE" == "darwin"* ]]; then
   find ./node_modules/crypto-api/src/ \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i '' -e '/\.mjs/!s/\(from "\.[^"]*\)";/\1.mjs";/g'