File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { execa } from "execa";
66// --- Configuration ---
77const CHANGELOG_PATH = path . resolve ( process . cwd ( ) , "CHANGELOG.md" ) ;
88const DRY_RUN = process . argv . includes ( "--dry-run" ) ;
9+ const SKIP_BUILDTEST = process . argv . includes ( "--skip-buildtest" ) ;
910
1011// --- Helper Functions ---
1112const log = {
@@ -81,6 +82,21 @@ async function checkPrerequisites() {
8182 log . success ( "Prerequisites met." ) ;
8283}
8384
85+ async function buildTest ( ) {
86+ log . info ( "Running tests and building documentation..." ) ;
87+ try {
88+ await run ( "pnpm" , [ "lint" ] ) ;
89+ await run ( "pnpm" , [ "test" ] ) ;
90+ await run ( "pnpm" , [ "docs:build" ] ) ;
91+ } catch ( error ) {
92+ log . error ( "Tests or documentation build failed." ) ;
93+ console . error ( error ) ;
94+ process . exit ( 1 ) ;
95+ }
96+
97+ log . success ( "Tests and documentation build completed successfully." ) ;
98+ }
99+
84100// --- Main Script ---
85101async function main ( ) {
86102 log . info ( "Starting release process..." ) ;
@@ -89,6 +105,12 @@ async function main() {
89105 }
90106
91107 await checkPrerequisites ( ) ;
108+ if ( SKIP_BUILDTEST ) {
109+ log . info ( "Skipping build tests." ) ;
110+ } else {
111+ log . info ( "Starting build tests." ) ;
112+ await buildTest ( ) ;
113+ }
92114
93115 // 1. Run changelogen to bump version and update changelog
94116 log . info ( "Bumping version and generating changelog with changelogen..." ) ;
You can’t perform that action at this time.
0 commit comments