mirror of
https://github.com/stCarolas/setup-maven.git
synced 2024-12-19 19:49:04 +00:00
add log for downloading
This commit is contained in:
parent
b25fe559e1
commit
c94f9216c7
@ -32,16 +32,17 @@ export async function getMaven(version: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function downloadMaven(version: string): Promise<string> {
|
async function downloadMaven(version: string): Promise<string> {
|
||||||
const toolDirectoryName = 'apache-maven-${version}';
|
const toolDirectoryName = `apache-maven-${version}`
|
||||||
const downloadUrl =
|
const downloadUrl =
|
||||||
'https://www-eu.apache.org/dist/maven/maven-3/${version}/binaries/${toolDirectoryName}-bin.tar.gz';
|
`https://www-eu.apache.org/dist/maven/maven-3/${version}/binaries/${toolDirectoryName}-bin.tar.gz`
|
||||||
|
console.log(`downloading ${downloadUrl}`)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const downloadPath = await tc.downloadTool(downloadUrl);
|
const downloadPath = await tc.downloadTool(downloadUrl)
|
||||||
const extractedPath = await tc.extractTar(downloadPath);
|
const extractedPath = await tc.extractTar(downloadPath)
|
||||||
let toolRoot = path.join(extractedPath, toolDirectoryName);
|
let toolRoot = path.join(extractedPath, toolDirectoryName)
|
||||||
return await tc.cacheDir(toolRoot, 'maven', version);
|
return await tc.cacheDir(toolRoot, 'maven', version)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw err;
|
throw err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user