Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
fix release mode check
Browse files Browse the repository at this point in the history
  • Loading branch information
leordev committed Oct 25, 2024
1 parent 4b04f46 commit 84fcc02
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
13 changes: 8 additions & 5 deletions .github/actions/specs-report/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/actions/specs-report/dist/index.js.map

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions .github/actions/specs-report/src/action-inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ export const readActionInputs = (): ActionInputs => {
const isDefaultReport = releaseMode === 'none' && !htmlReportWrite
const isReleaseSpecMode = releaseMode === 'spec'
const isReleaseSdkMode = releaseMode === 'sdk'
if (!isReleaseSpecMode && !isReleaseSdkMode && !isDefaultReport) {
throw new Error('Invalid release mode')
if (
!isReleaseSpecMode &&
!isReleaseSdkMode &&
!isDefaultReport &&
!htmlReportWrite
) {
throw new Error('Invalid execution mode')
}

const isReleaseMode = isReleaseSpecMode || isReleaseSdkMode
Expand Down
5 changes: 3 additions & 2 deletions .github/actions/specs-report/src/html-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const handleHtmlReleaseMatrixWrite = async (
`

const finalHtml = insertSpecComplianceReport(cleanHtml, specComplianceReport)
return writeFinalHtml(finalHtml, gitToken, indexSha)
return writeFinalHtml(htmlReportFile, finalHtml, gitToken, indexSha)
}

const getConformanceHtmlTable = async (
Expand Down Expand Up @@ -80,12 +80,13 @@ const insertSpecComplianceReport = (
}

const writeFinalHtml = async (
htmlReportFile: string,
finalHtml: string,
gitToken: string,
originalSha?: string
): Promise<void> => {
return writeGhPagesFile(
'index.html',
htmlReportFile,
finalHtml,
gitToken,
'Update Spec Releases Conformance Matrix',
Expand Down

0 comments on commit 84fcc02

Please sign in to comment.