Skip to content

Commit

Permalink
add prebuilds to the vsix
Browse files Browse the repository at this point in the history
Signed-off-by: zFernand0 <[email protected]>
  • Loading branch information
zFernand0 committed Feb 2, 2024
1 parent eb2a830 commit f8686e3
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 3 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@
"typescript": "^5.0.3",
"uuid": "^9.0.0"
}
}
}
3 changes: 2 additions & 1 deletion packages/vsce/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ lib/
.history/
logs/
.vscode-test/
results/
results/
prebuilds/
1 change: 1 addition & 0 deletions packages/vsce/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# Allowlist what we need
!dist/extension.*
!prebuilds/*
# !out/src/nls.metadata*.json
!resources/**/*.png
!resources/**/*.svg
Expand Down
3 changes: 2 additions & 1 deletion packages/vsce/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@
}
},
"scripts": {
"vscode:prepublish": "npm run tsupDep -- add && tsup && npm run tsupDep",
"vscode:prepublish": "npm run getPrebuilds && npm run tsupDep -- add && tsup && npm run tsupDep",
"build": "tsup && npm run checkTestsCompile && npm run madge",
"checkTestsCompile": "echo \"Checking that test source compiles...\" && tsc --project __tests__/test-tsconfig.json --noEmit ",
"madge": "echo 'Nothing to check'",
Expand All @@ -883,6 +883,7 @@
"test:unit": "jest --config unit.jest_config.ts --no-coverage",
"test": "npm run test:unit",
"tsupDep": "node ./scripts/tsup-deps.js",
"getPrebuilds": "node ./scripts/getSecretsPrebuilds.js",
"package": "vsce package --dependencies --allow-star-activation && node ../../scripts/mv-pack.js cics-extension-for-zowe vsix"
},
"devDependencies": {
Expand Down
15 changes: 15 additions & 0 deletions packages/vsce/scripts/getSecretsPrebuilds.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

const fsE = require("fs-extra");
const path = require("path");
const secretsPkgDir = path.resolve(require.resolve("@zowe/secrets-for-zowe-sdk"), "..", "..");
fsE.copySync(path.join(secretsPkgDir, "prebuilds"), path.resolve(__dirname, "..", "prebuilds"));
15 changes: 15 additions & 0 deletions scripts/getSecretsPrebuilds.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { copySync } from "fs-extra";
import { join, resolve } from "path";
const secretsPkgDir = resolve(require.resolve("@zowe/secrets-for-zowe-sdk"), "..", "..");
copySync(join(secretsPkgDir, "prebuilds"), resolve(__dirname, "..", "prebuilds"));

0 comments on commit f8686e3

Please sign in to comment.