Skip to content

Commit fa9a024

Browse files
committed
fix build scripts
1 parent d8c0540 commit fa9a024

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

lib/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
"lightweight",
106106
"kosha",
107107
"zustand",
108+
"react18",
108109
"frontend",
109110
"performance",
110111
"selectors",

scripts/update-security-md.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
const { execSync } = require("child_process");
22

33
module.exports = (newMajor_minor, oldMajor_minor) => {
4-
/** Update SECURITY.md */
5-
execSync(
6-
`sed -i -e "s/.*| :white_check_mark:.*/| ${newMajor_minor}.x | :white_check_mark: |/" SECURITY.md`,
7-
);
8-
execSync(
9-
`sed -i -e "s/.*| :warning:.*/| ${oldMajor_minor}.x | :warning: |/" SECURITY.md`,
10-
);
11-
execSync(`sed -i -e "s/.*| :x:.*/| < ${oldMajor_minor} | :x: |/" SECURITY.md`);
12-
execSync(
13-
`git add SECURITY.md && git commit -m 'Update SECURITY.md [skip ci]' && git push origin ${process.env.BRANCH}`,
14-
);
4+
try {
5+
/** Update SECURITY.md */
6+
execSync(
7+
`sed -i -e "s/.*| :white_check_mark:.*/| ${newMajor_minor}.x | :white_check_mark: |/" SECURITY.md`,
8+
);
9+
execSync(
10+
`sed -i -e "s/.*| :warning:.*/| ${oldMajor_minor}.x | :warning: |/" SECURITY.md`,
11+
);
12+
execSync(`sed -i -e "s/.*| :x:.*/| < ${oldMajor_minor} | :x: |/" SECURITY.md`);
13+
execSync(
14+
`git add SECURITY.md && git commit -m 'Update SECURITY.md [skip ci]' && git push origin ${process.env.BRANCH}`,
15+
);
16+
} catch (error) {
17+
console.error("Failed to update SECURITY.md or it was already updated", error);
18+
}
1519
};

0 commit comments

Comments
 (0)