mirror of
				https://github.com/gradle/gradle-build-action.git
				synced 2025-11-04 09:58:56 +08:00 
			
		
		
		
	Update Build Scan™ to Build Scan®
This commit is contained in:
		@@ -36,7 +36,7 @@ function writeSummaryTable(results: BuildResult[]): void {
 | 
			
		||||
        <th>Requested Tasks</th>
 | 
			
		||||
        <th>Gradle Version</th>
 | 
			
		||||
        <th>Build Outcome</th>
 | 
			
		||||
        <th>Build Scan™</th>
 | 
			
		||||
        <th>Build Scan®</th>
 | 
			
		||||
    </tr>${results.map(result => renderBuildResultRow(result)).join('')}
 | 
			
		||||
</table>
 | 
			
		||||
    `)
 | 
			
		||||
@@ -72,7 +72,7 @@ function renderBuildScan(result: BuildResult): string {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function renderBuildScanBadge(outcomeText: string, outcomeColor: string, targetUrl: string): string {
 | 
			
		||||
    const badgeUrl = `https://img.shields.io/badge/Build%20Scan%E2%84%A2-${outcomeText}-${outcomeColor}?logo=Gradle`
 | 
			
		||||
    const badgeUrl = `https://img.shields.io/badge/Build%20Scan%C2%AE-${outcomeText}-${outcomeColor}?logo=Gradle`
 | 
			
		||||
    const badgeHtml = `<img src="${badgeUrl}" alt="Build Scan ${outcomeText}" />`
 | 
			
		||||
    return `<a href="${targetUrl}" rel="nofollow">${badgeHtml}</a>`
 | 
			
		||||
}
 | 
			
		||||
@@ -81,7 +81,7 @@ function logSummaryTable(results: BuildResult[]): void {
 | 
			
		||||
    core.info('============================')
 | 
			
		||||
    core.info('Gradle Builds')
 | 
			
		||||
    core.info('----------------------------')
 | 
			
		||||
    core.info('Root Project | Requested Tasks | Gradle Version | Build Outcome | Build Scan™')
 | 
			
		||||
    core.info('Root Project | Requested Tasks | Gradle Version | Build Outcome | Build Scan®')
 | 
			
		||||
    core.info('----------------------------')
 | 
			
		||||
    for (const result of results) {
 | 
			
		||||
        core.info(
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ if (isTopLevelBuild) {
 | 
			
		||||
                captureUsingBuildFinished(gradle, invocationId)
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            // The `buildScanPublished` hook allows the capture of the build scan URI.
 | 
			
		||||
            // The `buildScanPublished` hook allows the capture of the Build Scan URI.
 | 
			
		||||
            // Results captured this way will overwrite any results from the other mechanism.
 | 
			
		||||
            settings.pluginManager.withPlugin("com.gradle.enterprise") {
 | 
			
		||||
                captureUsingBuildScanPublished(settings.extensions["gradleEnterprise"].buildScan, settings.rootProject, invocationId)
 | 
			
		||||
@@ -34,7 +34,7 @@ if (isTopLevelBuild) {
 | 
			
		||||
            // By default, use 'buildFinished' to capture build results
 | 
			
		||||
            captureUsingBuildFinished(gradle, invocationId)
 | 
			
		||||
 | 
			
		||||
            // The `buildScanPublished` hook allows the capture of the build scan URI.
 | 
			
		||||
            // The `buildScanPublished` hook allows the capture of the Build Scan URI.
 | 
			
		||||
            // Results captured this way will overwrite any results from 'buildFinished'.
 | 
			
		||||
            gradle.rootProject.pluginManager.withPlugin("com.gradle.build-scan") {
 | 
			
		||||
                captureUsingBuildScanPublished(gradle.rootProject.extensions["buildScan"], gradle.rootProject, invocationId)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user