Run format tools and make sure npm all passes

This commit is contained in:
Will Jordan 2024-03-25 12:28:55 +01:00
parent 1dc3741f47
commit 5be5f5d093
3 changed files with 33 additions and 29 deletions

20
dist/index.js generated vendored
View File

@ -91,9 +91,15 @@ function run(platform) {
const godotDownloadPath = path_1.default.join(downloadsDir, `${versionName}.zip`);
const godotInstallationPath = platform.getUnzippedPath(installationDir, versionName, useDotnet);
const binDir = path_1.default.join(userDir, binRelativePath);
const exportTemplateUrl = includeTemplates ? (0, utils_1.getGodotUrl)(version, platform, useDotnet, true) : '';
const exportTemplatePath = includeTemplates ? (0, utils_1.getExportTemplatePath)(version, platform, useDotnet) : '';
const exportTemplateDownloadPath = includeTemplates ? path_1.default.join(downloadsDir, 'export_templates.zip') : '';
const exportTemplateUrl = includeTemplates
? (0, utils_1.getGodotUrl)(version, platform, useDotnet, true)
: '';
const exportTemplatePath = includeTemplates
? (0, utils_1.getExportTemplatePath)(version, platform, useDotnet)
: '';
const exportTemplateDownloadPath = includeTemplates
? path_1.default.join(downloadsDir, 'export_templates.zip')
: '';
core.info(`🤖 Godot version: ${version}`);
core.info(`🤖 Godot version name: ${versionName}`);
core.info(`🟣 Use .NET: ${useDotnet}`);
@ -124,8 +130,10 @@ function run(platform) {
core.endGroup();
// See if Godot is already installed.
core.startGroup(`🤔 Checking if Godot is already in cache...`);
const cachedPaths = includeTemplates ? [godotInstallationPath, exportTemplatePath] : [godotInstallationPath];
const cacheKey = includeTemplates ? godotUrl : godotUrl + '-no-templates';
const cachedPaths = includeTemplates
? [godotInstallationPath, exportTemplatePath]
: [godotInstallationPath];
const cacheKey = includeTemplates ? godotUrl : `${godotUrl}-no-templates`;
const cached = yield cache.restoreCache(cachedPaths.slice(), cacheKey);
let executables;
if (!cached) {
@ -2976,7 +2984,7 @@ class OidcClient {
.catch(error => {
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
Error Message: ${error.result.message}`);
Error Message: ${error.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -75,12 +75,15 @@ async function run(platform: Platform): Promise<void> {
)
const binDir = path.join(userDir, binRelativePath)
const exportTemplateUrl = includeTemplates ? getGodotUrl(version, platform, useDotnet, true) : ''
const exportTemplatePath = includeTemplates ? getExportTemplatePath(version, platform, useDotnet) : ''
const exportTemplateDownloadPath = includeTemplates ? path.join(
downloadsDir,
'export_templates.zip'
) : ''
const exportTemplateUrl = includeTemplates
? getGodotUrl(version, platform, useDotnet, true)
: ''
const exportTemplatePath = includeTemplates
? getExportTemplatePath(version, platform, useDotnet)
: ''
const exportTemplateDownloadPath = includeTemplates
? path.join(downloadsDir, 'export_templates.zip')
: ''
core.info(`🤖 Godot version: ${version}`)
core.info(`🤖 Godot version name: ${versionName}`)
@ -91,7 +94,7 @@ async function run(platform: Platform): Promise<void> {
core.info(`📥 Godot download path: ${godotDownloadPath}`)
core.info(`📦 Godot installation directory: ${installationDir}`)
core.info(`🤖 Godot installation path: ${godotInstallationPath}`)
if (includeTemplates) {
core.info(`🤖 Export Template url: ${exportTemplateUrl}`)
core.info(`📥 Export Template download path: ${exportTemplateDownloadPath}`)
@ -99,7 +102,7 @@ async function run(platform: Platform): Promise<void> {
} else {
core.info(`⏭️ Skipping Export Templates.`)
}
core.info(`📂 Bin directory: ${binDir}`)
core.info(`🤖 GodotSharp release: ${godotSharpRelease}`)
core.endGroup()
@ -115,13 +118,12 @@ async function run(platform: Platform): Promise<void> {
// See if Godot is already installed.
core.startGroup(`🤔 Checking if Godot is already in cache...`)
const cachedPaths = includeTemplates ? [ godotInstallationPath, exportTemplatePath] : [ godotInstallationPath ]
const cacheKey = includeTemplates ? godotUrl : godotUrl + '-no-templates'
const cached = await cache.restoreCache(
cachedPaths.slice(),
cacheKey
)
const cachedPaths = includeTemplates
? [godotInstallationPath, exportTemplatePath]
: [godotInstallationPath]
const cacheKey = includeTemplates ? godotUrl : `${godotUrl}-no-templates`
const cached = await cache.restoreCache(cachedPaths.slice(), cacheKey)
let executables: string[]
if (!cached) {
@ -141,7 +143,6 @@ async function run(platform: Platform): Promise<void> {
core.info(`✅ Godot downloaded to ${godotDownloadedPath}`)
core.endGroup()
// Extract Godot
core.startGroup(`📦 Extracting Godot to ${installationDir}...`)
@ -166,7 +167,6 @@ async function run(platform: Platform): Promise<void> {
core.info(`✅ Files shown`)
core.endGroup()
if (includeTemplates) {
core.startGroup(
`📥 Downloading Export Templates to ${exportTemplateDownloadPath}...`
@ -183,7 +183,6 @@ async function run(platform: Platform): Promise<void> {
core.info(`✅ Export Templates downloaded to ${templateDownloadedPath}`)
core.endGroup()
core.startGroup(
`📦 Extracting Export Templates to ${exportTemplatePath}...`
)
@ -220,10 +219,7 @@ async function run(platform: Platform): Promise<void> {
// Save extracted Godot contents to cache
core.startGroup(`💾 Saving extracted Godot download to cache...`)
await cache.saveCache(
cachedPaths,
cacheKey
)
await cache.saveCache(cachedPaths, cacheKey)
core.info(`✅ Godot saved to cache`)
core.endGroup()
} else {