mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-09-16 12:42:22 +08:00
Persist build-scan-capture init script into Gradle User Home
Instead of writing this file to a temp directory and referencing it on the Gradle command line, the init script is now written to Gradle User Home so that it is picked up automatically.
This commit is contained in:
@@ -1,15 +1,10 @@
|
||||
import * as exec from '@actions/exec'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import {writeInitScript} from './build-scan-capture'
|
||||
|
||||
export async function execute(executable: string, root: string, args: string[]): Promise<BuildResult> {
|
||||
let buildScanUrl: string | undefined
|
||||
|
||||
const initScript = writeInitScript()
|
||||
args.push('--init-script')
|
||||
args.push(initScript)
|
||||
|
||||
const buildScanFile = path.resolve(root, 'gradle-build-scan.txt')
|
||||
if (fs.existsSync(buildScanFile)) {
|
||||
fs.unlinkSync(buildScanFile)
|
||||
|
Reference in New Issue
Block a user