Skip to content

Commit eaae3b9

Browse files
committed
build: ensure we do not set undefined releaseType
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 0def122 commit eaae3b9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/node_modules/@stdlib/_tools/scripts/publish_packages.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -685,9 +685,15 @@ function publish( pkg, clbk ) {
685685
return invokeCallback( null, 'skipped' );
686686
}
687687

688-
changelog = generateChangelog( '@stdlib/'+pkg, {
689-
'releaseType': flags[ 'release-type' ]
690-
});
688+
if ( flags[ 'release-type' ] ) {
689+
// Case: release type specified, so we generate a changelog for the specified release type...
690+
changelog = generateChangelog( '@stdlib/'+pkg, {
691+
'releaseType': flags[ 'release-type' ]
692+
});
693+
} else {
694+
// Case: no release type specified, so we generate a changelog for a non-release...
695+
changelog = generateChangelog( '@stdlib/'+pkg );
696+
}
691697
releaseType = changelog.releaseType;
692698

693699
mainJSON = readJSON( join( mainDir, 'package.json' ) );

0 commit comments

Comments
 (0)