Skip to content

Commit

Permalink
ci: Fix publish-snapshot syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Dec 3, 2024
1 parent c02cb9c commit 44fd51a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 44fd51a

Please sign in to comment.