Skip to content

Commit 4fca21a

Browse files
authored
fix: update release scripts (#911)
1 parent 3c52e8d commit 4fca21a

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

scripts/post-release.ts

-17
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,6 @@ const updatePackageVersions = (version: string): void => {
3636
appPackageJsonPath,
3737
JSON.stringify(appPackageJson, null, 2)
3838
);
39-
40-
// Update versions in the docs directory
41-
const docsPath = path.resolve(__dirname, `../docs`);
42-
const docsJsonPath = path.resolve(docsPath, './package.json');
43-
const docsJson = JSON.parse(fs.readFileSync(docsJsonPath, 'utf8'));
44-
docsJson.version = version;
45-
fs.writeFileSync(docsJsonPath, JSON.stringify(docsJson, null, 2));
46-
47-
if (docsJson.dependencies != null) {
48-
for (const dep of Object.keys(docsJson.dependencies)) {
49-
if (packageNames.includes(dep)) {
50-
docsJson.dependencies[dep] = version;
51-
}
52-
}
53-
}
54-
55-
fs.writeFileSync(docsJsonPath, JSON.stringify(docsJson, null, 2));
5639
}
5740
};
5841

scripts/pre-release.ts

+21-4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@ const updatePackageVersions = (version: string): void => {
3636

3737
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkgJson, null, 2));
3838
}
39+
40+
// Update versions in the docs directory
41+
const docsPath = path.resolve(__dirname, `../docs`);
42+
const docsJsonPath = path.resolve(docsPath, './package.json');
43+
const docsJson = JSON.parse(fs.readFileSync(docsJsonPath, 'utf8'));
44+
docsJson.version = version;
45+
fs.writeFileSync(docsJsonPath, JSON.stringify(docsJson, null, 2));
46+
47+
if (docsJson.dependencies != null) {
48+
for (const dep of Object.keys(docsJson.dependencies)) {
49+
if (packageNames.includes(dep)) {
50+
docsJson.dependencies[dep] = version;
51+
}
52+
}
53+
}
54+
55+
fs.writeFileSync(docsJsonPath, JSON.stringify(docsJson, null, 2));
3956
};
4057

4158
const preparePackages = async () => {
@@ -59,10 +76,10 @@ const preparePackages = async () => {
5976
await exec('yarn build');
6077
console.log('\t- ✅ Built!');
6178

62-
// console.log(' Test:');
63-
// console.log('\t- 🧪 Testing packages...');
64-
// await exec('yarn test:solo');
65-
// console.log('\t- ✅ Success!');
79+
console.log(' Test:');
80+
console.log('\t- 🧪 Testing packages...');
81+
await exec('yarn test:solo');
82+
console.log('\t- ✅ Success!');
6683

6784
console.log(' Version:');
6885
console.log(`\t- 🏷 Updating package versions to ${version}...`);

0 commit comments

Comments
 (0)