From efe411c909470e6042b1051687506af7386b8cb5 Mon Sep 17 00:00:00 2001 From: Dawid Urbas Date: Thu, 29 Feb 2024 17:56:52 +0000 Subject: [PATCH] Test script --- .github/workflows/test.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d43fdf3..154c714 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -25,13 +25,21 @@ jobs: const fetchVersionInfo = async () => { try { const data = await fs.readFile('./static/manifest.json', 'utf8'); + console.log('Read file data:', data); const manifest = JSON.parse(data); + console.log('Parsed manifest:', manifest); const currentVersion = manifest.version; + console.log('Current version:', currentVersion); const response = await fetch(`https://chromewebstore.google.com/detail/holo-key-manager/${process.env.CHROME_ID}`); + console.log('Fetched response:', response); const text = await response.text(); + console.log('Response text:', text); const versionPattern = /]*>Version<\/div>]*>(\d+\.\d+\.\d+)<\/div>/; + console.log('Version pattern:', versionPattern); const versionMatch = text.match(versionPattern); + console.log('Version match:', versionMatch); const latestVersion = versionMatch ? versionMatch[1] : null; + console.log('Latest version:', latestVersion); core.setOutput('abort', currentVersion === latestVersion ? 'true' : 'false'); } catch (error) { core.setFailed(error.message);