Skip to content

Commit bee33d8

Browse files
committed
build: Update release script
1 parent 26f1b71 commit bee33d8

File tree

8 files changed

+6729
-4232
lines changed

8 files changed

+6729
-4232
lines changed

.versionrc.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const files = ["packages/docusaurus-search-local/package.json"];
2+
3+
module.exports = {
4+
packageFiles: files,
5+
bumpFiles: files,
6+
sign: true,
7+
scripts: {
8+
// Make sure that there is nothing to format before generating the changelog.
9+
prechangelog: "npm run lint",
10+
// Format the generated changelog.
11+
postchangelog: "npm run format",
12+
},
13+
header: `\
14+
# Change Log
15+
16+
All notable changes to this project will be documented in this file.
17+
This change log is automatically generated based on commit messags. See
18+
[Commit Message Guidelines](CONTRIBUTING.md#commit-message-guidelines)
19+
for more information.`,
20+
types: [
21+
{ type: "feat", section: "Features" },
22+
{ type: "fix", section: "Bug Fixes" },
23+
{ type: "deps", section: "Other", hidden: true },
24+
{ type: "chore", section: "Other", hidden: true },
25+
],
26+
};

package-lock.json

+6,674-4,124
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"@commitlint/cli": "^17.4.4",
99
"@commitlint/config-conventional": "^17.4.4",
1010
"@types/node": "^16.18.12",
11+
"commit-and-tag-version": "^11.1.0",
1112
"git-branch-is": "^4.0.0",
1213
"husky": "^7.0.4",
1314
"lint-staged": "^12.1.2",
@@ -27,7 +28,8 @@
2728
"lint:style": "prettier --check **/*.{js,jsx,ts,tsx,json,css,scss,md,html}",
2829
"lint:dependencies": "syncpack list-mismatches",
2930
"format:style": "prettier --write **/*.{js,jsx,ts,tsx,json,css,scss,md,html}",
30-
"format:dependencies": "syncpack fix-mismatches"
31+
"format:dependencies": "syncpack fix-mismatches",
32+
"release": "bash scripts/release.sh"
3133
},
3234
"lint-staged": {
3335
"**/*.{js,jsx,ts,tsx,json,css,scss,md,html}": [

packages/docusaurus-search-local/CHANGELOG.md

-80
This file was deleted.

packages/docusaurus-search-local/package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@
1717
"/codeTranslations",
1818
"/lib",
1919
"/LICENSE",
20+
"/CHANGELOG.md",
2021
"/README.md"
2122
],
2223
"publishConfig": {
2324
"access": "public"
2425
},
2526
"author": "Christian Flach",
2627
"dependencies": {
27-
"@algolia/autocomplete-js": "^1.5.1",
28-
"@algolia/autocomplete-theme-classic": "^1.5.1",
28+
"@algolia/autocomplete-js": "^1.8.2",
29+
"@algolia/autocomplete-theme-classic": "^1.8.2",
2930
"@algolia/client-search": "^4.12.0",
3031
"algoliasearch": "^4.12.0",
3132
"cheerio": "^1.0.0-rc.9",
@@ -87,6 +88,8 @@
8788
"dev:client:cp": "nodemon --watch src/client --ext css --exec \"copyfiles --up 1 src/client/**/*.css lib && touch lib/client/theme/SearchBar/index.js\" ",
8889
"dev:server": "tsc --project tsconfig.server.json --watch",
8990
"test": "jest src",
90-
"test:e2e": "playwright test e2e-tests"
91+
"test:e2e": "playwright test e2e-tests",
92+
"prepack": "cp ../../CHANGELOG.md ../../README.md .",
93+
"postpack": "rm -f CHANGELOG.md README.md"
9194
}
9295
}

packages/example-docs/turbo.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"pipeline": {
55
"build": {
66
"dependsOn": ["^build"],
7-
"outputs": ["build/**", ".docusaurus/**"]
7+
"outputs": ["build/**", ".docusaurus/**"],
8+
"cache": false
89
}
910
}
1011
}

scripts/publish.sh

-23
This file was deleted.

scripts/release.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -e
3+
4+
npm install
5+
npm run lint
6+
npm run build
7+
npm run test
8+
npm run test:e2e -- -- --browser=all
9+
10+
npm run build -w example-docs -- --config docusaurus.config.noTrailingSlash.js
11+
npm run build -w example-docs -- --config docusaurus.config.subDirectory.js
12+
npm run build -w example-docs -- --config docusaurus.config.noTrailingSlashSubdirectory.js
13+
14+
npx commit-and-tag-version "$@"
15+
npm -w @cmfcmf/docusaurus-search-local pack
16+
npm login
17+
npm -w @cmfcmf/docusaurus-search-local publish
18+
git push --follow-tags origin main

0 commit comments

Comments
 (0)