mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Move target to package.json
This commit is contained in:
parent
05f1289268
commit
7f1710fb73
2 changed files with 4 additions and 3 deletions
2
.github/workflows/create-artifact.yml
vendored
2
.github/workflows/create-artifact.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
5
build.js
5
build.js
|
|
@ -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));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue