diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index cbcdbc47..2f1ac19b 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -56,5 +56,5 @@ jobs: run: npm install --ws=@jazzer.js/fuzzer - name: build and upload prebuilds run: > - npm run prebuild --workspace=@jazzer.js/fuzzer -- ${{ matrix.opts }} - --upload ${{secrets.GITHUB_TOKEN}} + npm run build-native --workspace=@jazzer.js/fuzzer -- ${{ matrix.opts + }} --upload ${{secrets.GITHUB_TOKEN}} diff --git a/end-to-end/package-jazzer-js.sh b/end-to-end/package-jazzer-js.sh index 3994b9bc..a178ad10 100755 --- a/end-to-end/package-jazzer-js.sh +++ b/end-to-end/package-jazzer-js.sh @@ -1,9 +1,15 @@ -#!/bin/sh +#!/usr/bin/env bash +set -e -cd .. -npm install -npm run build -npm run build --workspace='@jazzer.js/fuzzer' +main() { + cd .. + npm install + npm run build + npm run build --workspace='@jazzer.js/fuzzer' + + local tarballs=$(npm pack --workspaces | grep ".tgz") + echo "$tarballs" | sed_version_and_mv +} sed_version_and_mv() { while read data; do @@ -13,4 +19,4 @@ sed_version_and_mv() { done } -npm pack --workspaces | sed_version_and_mv +main \ No newline at end of file diff --git a/packages/fuzzer/package.json b/packages/fuzzer/package.json index fee685e6..f3d2dee8 100644 --- a/packages/fuzzer/package.json +++ b/packages/fuzzer/package.json @@ -16,9 +16,10 @@ "main": "dist/fuzzer.js", "types": "dist/fuzzer.d.ts", "scripts": { - "prebuild": "prebuild --runtime napi --backend cmake-js --all --strip --verbose", - "install": "prebuild-install --runtime napi || npm run prebuild", - "build": "cmake-js build --out build", + "build-native": "prebuild --runtime napi --backend cmake-js --all --strip --verbose", + "install": "prebuild-install --runtime napi || npm run build-native", + "build:dev": "cmake-js configure --out build --debug && cmake-js build", + "build": "cmake-js configure --out build && cmake-js build", "format:fix": "clang-format -i *.cpp shared/*.cpp shared/*.h", "lint": "find . -path ./build -prune -type f -o -iname '*.h' -o -iname '*.cpp' | xargs clang-tidy" },