Skip to content

Commit 1651e60

Browse files
replace tarball renaming scripts with oclif patch (#1846)
1 parent 56f61b2 commit 1651e60

File tree

5 files changed

+23
-39
lines changed

5 files changed

+23
-39
lines changed

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,10 @@
3838
"@types/node": "^22.10.1",
3939
"eslint": "9.16.0",
4040
"prettier": "3.4.2"
41+
},
42+
"pnpm": {
43+
"patchedDependencies": {
44+
45+
}
4146
}
4247
}

packages/cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
],
2323
"scripts": {
2424
"build": "tsc -b tsconfig.build.json && oclif manifest && oclif readme && copyfiles -u 1 src/**/*.graphql dist/",
25-
"oclif:pack": "npm pack && pnpm oclif pack tarballs --no-xz && node scripts/rename-tarballs.mjs",
25+
"oclif:pack": "npm pack && pnpm oclif pack tarballs --no-xz",
2626
"test": "vitest run --bail=1",
2727
"test:add": "vitest run tests/cli/add.test.ts",
2828
"test:init": "vitest run tests/cli/init.test.ts",

packages/cli/scripts/rename-tarballs.mjs

-35
This file was deleted.

patches/[email protected]

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/lib/tarballs/build.js b/lib/tarballs/build.js
2-
index a7577a89c721bf4a52657f037fcc079e8fa9dca3..ebf5245840ac671064c8699f166102b2cc5d85c3 100644
2+
index a7577a89c721bf4a52657f037fcc079e8fa9dca3..51c33346763dee8c60a3b59b8c46b6789c496239 100644
33
--- a/lib/tarballs/build.js
44
+++ b/lib/tarballs/build.js
55
@@ -195,8 +195,10 @@ const addDependencies = async (c) => {
@@ -15,3 +15,12 @@ index a7577a89c721bf4a52657f037fcc079e8fa9dca3..ebf5245840ac671064c8699f166102b2
1515
await exec('npm install --production', { cwd: c.workspace() });
1616
}
1717
};
18+
@@ -229,7 +231,7 @@ const buildTarget = async (target, c, options) => {
19+
const { bin, version } = c.config;
20+
const { gitSha: sha } = c;
21+
const templateShortKeyCommonOptions = { arch, bin, platform, sha, version };
22+
- const [gzLocalKey, xzLocalKey] = ['.tar.gz', '.tar.xz'].map((ext) => (0, upload_util_1.templateShortKey)('versioned', { ...templateShortKeyCommonOptions, ext }));
23+
+ const [gzLocalKey, xzLocalKey] = ['.tar.gz', '.tar.xz'].map((ext) => (0, upload_util_1.templateShortKey)('unversioned', { ...templateShortKeyCommonOptions, ext }));
24+
const base = path.basename(gzLocalKey);
25+
(0, log_1.log)(`building target ${base}`);
26+
(0, log_1.log)('copying workspace', c.workspace(), workspace);

pnpm-lock.yaml

+7-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)