mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-07 16:56:12 +02: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:
parent
b0c29bffb7
commit
a72af0b6a6
3 changed files with 6 additions and 15 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue