diff --git a/dist/index.js b/dist/index.js index 3b05f70..a8272b9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -202,14 +202,16 @@ async function ensure_juliaup_is_installed() { // await _install_juliaup() // 3. If it wasn't found in the toolcache, we have to download it ourselves. if (!juliaup_dir) { - // Download and extract Juliaup to a + // Download and extract Juliaup to a temp directory: const extracted_download_path = await download_and_extract_juliaup_to_temp_dir(juliaup_version); + // Copy Juliaup from the temp directory to the toolcache: juliaup_dir = await tc.cacheDir(extracted_download_path, tool_name, juliaup_version, arch); + core.info(`Added Juliaup to the toolcache: ${juliaup_dir}`); } else { // If we found the desired version of Juliaup in the toolcache, // then we use that. - core.info(`Using tool-cached version of Juliaup: ${juliaup_dir}`); + core.info(`Using existing tool-cached version of Juliaup: ${juliaup_dir}`); } // 4. Add Juliaup (and thus also Julialauncher) to the PATH. await core.addPath(juliaup_dir); @@ -229,7 +231,7 @@ async function _get_latest_juliaup_version() { async function download_and_extract_juliaup_to_temp_dir(juliaup_version) { // 1. Construct the Juliaup tarball download URL. const tarball_download_url = await _construct_juliaup_tarball_download_url(juliaup_version); - core.info(`We will download Juliaup from: ${tarball_download_url}`); + core.info(`Attempting to download Juliaup from: ${tarball_download_url}`); // 2. Download the Juliaup tarball (from the above URL) to a temp directory. // Taken from: https://github.com/julia-actions/setup-julia/blob/e9d953d306cac42c94058f27c6564ec50d97d913/src/installer.ts#L216-L225 // diff --git a/lib/juliaup.js b/lib/juliaup.js index f9d0ed5..18b6121 100644 --- a/lib/juliaup.js +++ b/lib/juliaup.js @@ -44,14 +44,16 @@ async function ensure_juliaup_is_installed() { // await _install_juliaup() // 3. If it wasn't found in the toolcache, we have to download it ourselves. if (!juliaup_dir) { - // Download and extract Juliaup to a + // Download and extract Juliaup to a temp directory: const extracted_download_path = await download_and_extract_juliaup_to_temp_dir(juliaup_version); + // Copy Juliaup from the temp directory to the toolcache: juliaup_dir = await tc.cacheDir(extracted_download_path, tool_name, juliaup_version, arch); + core.info(`Added Juliaup to the toolcache: ${juliaup_dir}`); } else { // If we found the desired version of Juliaup in the toolcache, // then we use that. - core.info(`Using tool-cached version of Juliaup: ${juliaup_dir}`); + core.info(`Using existing tool-cached version of Juliaup: ${juliaup_dir}`); } // 4. Add Juliaup (and thus also Julialauncher) to the PATH. await core.addPath(juliaup_dir); @@ -71,7 +73,7 @@ async function _get_latest_juliaup_version() { async function download_and_extract_juliaup_to_temp_dir(juliaup_version) { // 1. Construct the Juliaup tarball download URL. const tarball_download_url = await _construct_juliaup_tarball_download_url(juliaup_version); - core.info(`We will download Juliaup from: ${tarball_download_url}`); + core.info(`Attempting to download Juliaup from: ${tarball_download_url}`); // 2. Download the Juliaup tarball (from the above URL) to a temp directory. // Taken from: https://github.com/julia-actions/setup-julia/blob/e9d953d306cac42c94058f27c6564ec50d97d913/src/installer.ts#L216-L225 // diff --git a/lib/juliaup.js.map b/lib/juliaup.js.map index b391340..dadb2d1 100644 --- a/lib/juliaup.js.map +++ b/lib/juliaup.js.map @@ -1 +1 @@ -{"version":3,"file":"juliaup.js","sourceRoot":"","sources":["../src/juliaup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA2D;AAC3D,oDAAqC;AACrC,wCAAwC;AACxC,wDAAyC;AAEzC,qBAAqB;AACrB,qCAAqC;AAErC,4BAA4B;AAC5B,iDAAkC;AAClC,qDAAsC;AAE/B,KAAK,UAAU,2BAA2B;IAC7C,gDAAgD;IAChD,MAAM,eAAe,GAAG,MAAM,2BAA2B,EAAE,CAAA;IAE3D,IAAI,WAAmB,CAAC;IAExB,mFAAmF;IACnF,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;IACzB,MAAM,SAAS,GAAG,SAAS,CAAA;IAC3B,WAAW,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,EAAE,IAAI,CAAC,CAAA;IACvD,2BAA2B;IAE3B,4EAA4E;IAC5E,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,oCA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O,GAAG,QAAQ,CAAC,oBAAoB,EAAE,CAAA;IAC/C,MAAM,GAAG,GAAG,2DAA2D,eAAe,YAAY,eAAe,IAAI,OAAO,kBAAkB,CAAA;IAC9I,OAAO,GAAG,CAAA;AACd,CAAC"} \ No newline at end of file diff --git a/src/juliaup.ts b/src/juliaup.ts index c17e68a..220264c 100644 --- a/src/juliaup.ts +++ b/src/juliaup.ts @@ -24,13 +24,16 @@ export async function ensure_juliaup_is_installed() { // 3. If it wasn't found in the toolcache, we have to download it ourselves. if (!juliaup_dir) { - // Download and extract Juliaup to a + // Download and extract Juliaup to a temp directory: const extracted_download_path = await download_and_extract_juliaup_to_temp_dir(juliaup_version) + + // Copy Juliaup from the temp directory to the toolcache: juliaup_dir = await tc.cacheDir(extracted_download_path, tool_name, juliaup_version, arch) + core.info(`Added Juliaup to the toolcache: ${juliaup_dir}`) } else { // If we found the desired version of Juliaup in the toolcache, // then we use that. - core.info(`Using tool-cached version of Juliaup: ${juliaup_dir}`) + core.info(`Using existing tool-cached version of Juliaup: ${juliaup_dir}`) } // 4. Add Juliaup (and thus also Julialauncher) to the PATH. @@ -54,7 +57,7 @@ async function _get_latest_juliaup_version() { async function download_and_extract_juliaup_to_temp_dir(juliaup_version: string) { // 1. Construct the Juliaup tarball download URL. const tarball_download_url = await _construct_juliaup_tarball_download_url(juliaup_version) - core.info(`We will download Juliaup from: ${tarball_download_url}`) + core.info(`Attempting to download Juliaup from: ${tarball_download_url}`) // 2. Download the Juliaup tarball (from the above URL) to a temp directory. // Taken from: https://github.com/julia-actions/setup-julia/blob/e9d953d306cac42c94058f27c6564ec50d97d913/src/installer.ts#L216-L225