Skip to content

Commit c417014

Browse files
Copilotcompulim
andauthored
Revert make.com vendoring, download with SHA-256 verification (#5684)
* Initial plan * Revert make.com vendoring, add SHA verification and download from Internet Co-authored-by: compulim <1622400+compulim@users.noreply.github.com> * Security: Move chmod after SHA verification Co-authored-by: compulim <1622400+compulim@users.noreply.github.com> * Remove makeComSha256 field, hardcode SHA in build:pre:setup script Co-authored-by: compulim <1622400+compulim@users.noreply.github.com> * Reorder build:pre script: local-dependencies before setup Co-authored-by: compulim <1622400+compulim@users.noreply.github.com> * Use more specific .gitignore patterns with leading/trailing slashes Co-authored-by: compulim <1622400+compulim@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: compulim <1622400+compulim@users.noreply.github.com>
1 parent d143c80 commit c417014

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
node_modules
2-
out
1+
/make.com
2+
/node_modules/
3+
/out/

packages/test/test-assets/make.com

-1.64 MB
Binary file not shown.

packages/test/test-assets/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@msinternal/test-assets",
33
"version": "0.0.0-0",
4-
"description": "",
4+
"description": "Uses make.com from Cosmopolitan Libc. Source code available at: https://github.com/jart/cosmopolitan/tree/master/third_party/make",
55
"private": true,
66
"author": "Microsoft Corporation",
77
"license": "MIT",
@@ -10,10 +10,11 @@
1010
},
1111
"scripts": {
1212
"build": "npm run --if-present build:pre && npm run build:run && npm run --if-present build:post",
13-
"build:pre": "npm run build:pre:local-dependencies && npm run build:pre:watch",
13+
"build:pre": "npm run build:pre:local-dependencies && npm run build:pre:setup && npm run build:pre:watch",
1414
"build:pre:local-dependencies": "../../../scripts/npm/build-local-dependencies.sh",
15+
"build:pre:setup": "command -v make >/dev/null 2>&1 || { [ -x ./make.com ] || { curl -fsSL -o make.com https://cosmo.zip/pub/cosmos/bin/make && EXPECTED_SHA=7b14377fbd6fff445abbf922583112c25a678b375eea624bd1765f74756f54fb && ACTUAL_SHA=$(shasum -a 256 make.com | cut -d' ' -f1) && [ \"$EXPECTED_SHA\" = \"$ACTUAL_SHA\" ] || { echo \"ERROR: make.com SHA mismatch! Expected: $EXPECTED_SHA, Got: $ACTUAL_SHA\" >&2; rm make.com; exit 1; } && chmod +x make.com; }; }",
1516
"build:pre:watch": "../../../scripts/npm/build-watch.sh",
16-
"build:run": "./make.com clean all",
17+
"build:run": "MAKE_BIN=$(command -v make || echo ./make.com) && \"$MAKE_BIN\" clean all",
1718
"bump": "vg bump prod && vg bump dev && (npm audit fix || exit 0)",
1819
"eslint": "npm run precommit",
1920
"postversion": "../../../scripts/npm/postversion.sh",

0 commit comments

Comments
 (0)