From 7fcd68f14d0bd3b278abefd88d08ecb508f25f50 Mon Sep 17 00:00:00 2001 From: forehal Date: Fri, 7 Apr 2023 14:58:12 +0800 Subject: [PATCH] fix(cli): incorrect new project template content --- cli/src/api/templates/ci-template.ts | 18 +++++++++--------- cli/src/api/templates/package.json.ts | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/cli/src/api/templates/ci-template.ts b/cli/src/api/templates/ci-template.ts index c7995e98..e7e266c4 100644 --- a/cli/src/api/templates/ci-template.ts +++ b/cli/src/api/templates/ci-template.ts @@ -71,7 +71,7 @@ jobs: sudo apt-get update sudo apt-get install gcc-arm-linux-gnueabihf -y build: | - yarn build --platform --target armv7-unknown-linux-gnueabihf + yarn build --platform --target armv7-unknown-linux-gnueabihf --cross-compile arm-linux-gnueabihf-strip *.node - host: ubuntu-latest target: 'aarch64-linux-android' @@ -237,7 +237,7 @@ jobs: target: 'x86_64-apple-darwin' - host: windows-latest target: 'x86_64-pc-windows-msvc' - node: ['14', '16', '18'] + node: ['16', '18'] runs-on: \${{ matrix.settings.host }} steps: @@ -273,7 +273,7 @@ jobs: strategy: fail-fast: false matrix: - node: ['14', '16', '18'] + node: ['16', '18'] runs-on: ubuntu-latest steps: @@ -309,7 +309,7 @@ jobs: strategy: fail-fast: false matrix: - node: ['14', '16', '18'] + node: ['16', '18'] runs-on: ubuntu-latest steps: @@ -347,7 +347,7 @@ jobs: strategy: fail-fast: false matrix: - node: ['14', '16', '18'] + node: ['16', '18'] runs-on: ubuntu-latest steps: @@ -433,7 +433,7 @@ jobs: strategy: fail-fast: false matrix: - node: ['14', '16', '18'] + node: ['16', '18'] runs-on: ubuntu-latest steps: @@ -493,15 +493,15 @@ jobs: uses: actions/download-artifact@v3 with: name: bindings-x86_64-apple-darwin - path: artifacts + path: . - name: Download macOS arm64 artifact uses: actions/download-artifact@v3 with: name: bindings-aarch64-apple-darwin - path: artifacts + path: . - name: Combine binaries - run: yarn universal + run: yarn napi universalize - name: Upload artifact uses: actions/upload-artifact@v3 diff --git a/cli/src/api/templates/package.json.ts b/cli/src/api/templates/package.json.ts index 0d46df4b..efb6a4c5 100644 --- a/cli/src/api/templates/package.json.ts +++ b/cli/src/api/templates/package.json.ts @@ -29,12 +29,11 @@ export const createPackageJson = ({ ] }, "scripts": { - "test": "yarn build:debug --platform && node -e \\"assert(require('.').sum(1, 2) === 3)\\"", + "test": "node -e \\"assert(require('.').sum(1, 2) === 3)\\"", "build": "napi build --release --platform --strip", "build:debug": "napi build", "prepublishOnly": "napi prepublish -t npm", "artifacts": "napi artifacts", - "universal": "napi universal", "version": "napi version" }, "devDependencies": {