Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/commands/prepare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,15 @@ function checkGitStatus(repoStatus: StatusResult, rev: string) {
* This function will never return: it terminates the process with the
* corresponding error code after publishing is done.
*
* @param remote The git remote to use when pushing
* @param newVersion Version to publish
* @param noGitChecks If true, skip git status checks
*/
async function execPublish(remote: string, newVersion: string): Promise<never> {
async function execPublish(
remote: string,
newVersion: string,
noGitChecks: boolean
): Promise<never> {
logger.info('Running the "publish" command...');
const publishOptions: PublishOptions = {
remote,
Expand All @@ -367,6 +373,7 @@ async function execPublish(remote: string, newVersion: string): Promise<never> {
keepDownloads: false,
noMerge: false,
noStatusCheck: false,
noGitChecks,
};
logger.info(
`Sleeping for ${SLEEP_BEFORE_PUBLISH_SECONDS} seconds before publishing...`
Expand Down Expand Up @@ -750,7 +757,7 @@ export async function prepareMain(argv: PrepareOptions): Promise<any> {

if (argv.publish) {
logger.success(`Release branch "${branchName}" has been pushed.`);
await execPublish(argv.remote, newVersion);
await execPublish(argv.remote, newVersion, argv.noGitChecks);
} else {
logger.success(
'Done. Do not forget to run "craft publish" to publish the artifacts:',
Expand Down
Loading