Move target to package.json

This commit is contained in:
Sander Declerck 2025-11-28 11:17:28 +01:00
parent 05f1289268
commit 7f1710fb73
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -63,7 +63,7 @@ jobs:
- name: Create binary - name: Create binary
run: | run: |
node build.js ${{ matrix.target }} node build.js ${{ matrix.target }}
pkg ./build/package.json -t ${{ matrix.target }} pkg ./build/package.json
- name: Upload binary artifact - name: Upload binary artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4

View file

@ -15,7 +15,7 @@ if (!target) {
await clearOutputFolder(); await clearOutputFolder();
await bundleSafeChain(); await bundleSafeChain();
await copyShellScripts(); await copyShellScripts();
await copyAndModifyPackageJson(); await copyAndModifyPackageJson(target);
// await buildSafeChainBinary(target); // await buildSafeChainBinary(target);
})(); })();
@ -42,7 +42,7 @@ async function copyShellScripts() {
{ recursive: true } { recursive: true }
); );
} }
async function copyAndModifyPackageJson() { async function copyAndModifyPackageJson(target) {
const packageJsonContent = await readFile( const packageJsonContent = await readFile(
"./packages/safe-chain/package.json", "./packages/safe-chain/package.json",
"utf-8" "utf-8"
@ -62,6 +62,7 @@ async function copyAndModifyPackageJson() {
packageJson.pkg = { packageJson.pkg = {
outputPath: "dist", outputPath: "dist",
assets: ["node_modules/certifi/**/*", "bin/startup-scripts/**/*"], assets: ["node_modules/certifi/**/*", "bin/startup-scripts/**/*"],
targets: [target],
}; };
await writeFile("./build/package.json", JSON.stringify(packageJson, null, 2)); await writeFile("./build/package.json", JSON.stringify(packageJson, null, 2));