From c8444da3ee9d47562d4bccecb23cb7d784eb4c2f Mon Sep 17 00:00:00 2001 From: BlayTheNinth <1933180+BlayTheNinth@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:10:38 +0100 Subject: [PATCH] ci: Fix publish-snapshot syntax error --- .github/workflows/publish-snapshot.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index 4d99056..ef34a81 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -17,17 +17,17 @@ jobs: uses: actions/github-script@v7 with: script: | -const fs = require('fs'); -const settingsGradle = fs.readFileSync('settings.gradle', 'utf8'); -const includePattern = /^(?!\s*\/\/)\s*include\s*\(\s*(['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])*\s*)\)/gm; -const includes = [...settingsGradle.matchAll(includePattern)] - .flatMap(match => match[0].match(/['"]([^'"]+)['"]/g).map(item => item.replace(/['"]/g, ''))); -const includeFabric = includes.includes('fabric'); -const includeForge = includes.includes('forge'); -const includeNeoForge = includes.includes('neoforge'); -return { - loader: ['common', includeFabric ? 'fabric' : false, includeForge ? 'forge' : false, includeNeoForge ? 'neoforge' : false].filter(Boolean), -}; + const fs = require('fs'); + const settingsGradle = fs.readFileSync('settings.gradle', 'utf8'); + const includePattern = /^(?!\s*\/\/)\s*include\s*\(\s*(['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])*\s*)\)/gm; + const includes = [...settingsGradle.matchAll(includePattern)] + .flatMap(match => match[0].match(/['"]([^'"]+)['"]/g).map(item => item.replace(/['"]/g, ''))); + const includeFabric = includes.includes('fabric'); + const includeForge = includes.includes('forge'); + const includeNeoForge = includes.includes('neoforge'); + return { + loader: ['common', includeFabric ? 'fabric' : false, includeForge ? 'forge' : false, includeNeoForge ? 'neoforge' : false].filter(Boolean), + }; publish-snapshot: runs-on: ubuntu-latest strategy: