Skip to content

Commit

Permalink
Merge pull request #6 from Junkie-Monkey/develop
Browse files Browse the repository at this point in the history
Merge Develop
  • Loading branch information
KuryKat authored Jan 22, 2023
2 parents c7a6f40 + 3e00823 commit 6dccf66
Show file tree
Hide file tree
Showing 572 changed files with 75,318 additions and 75,316 deletions.
56 changes: 28 additions & 28 deletions .github/actions/ci/log-kubejs-warnings.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
// This script is responsible for reading the kubejs server log,
// and determining whether it contained errors or not.

const fs = require('fs');
const server = fs.readFileSync('logs/kubejs/server.txt', 'utf-8');

let warnings = [];

server.split(/\r?\n/).forEach((line) => {

// the 2nd reload causes this error, avoid reporting this
if (line.includes('shadows.menu.PackMenuClient')) return;

// get the log level from this line, expected values: [ undefined, INFO, WARN, ERR ]
const in_brackets = line.match(/\[\d{2}:\d{2}:\d{2}] \[([A-Z\s]+)]/)?.[1];

switch (in_brackets) {
case 'ERR ': warnings.push(line);
case 'WARN ': console.log(line);
}
});

warnings.forEach(warning => {
console.log(`::warning::${warning}`);
});

// return with exit code 1 for any warning amount
process.exit(Math.min(1, warnings.length));
// This script is responsible for reading the kubejs server log,
// and determining whether it contained errors or not.

const fs = require('fs');
const server = fs.readFileSync('logs/kubejs/server.txt', 'utf-8');

let warnings = [];

server.split(/\r?\n/).forEach((line) => {

// the 2nd reload causes this error, avoid reporting this
if (line.includes('shadows.menu.PackMenuClient')) return;

// get the log level from this line, expected values: [ undefined, INFO, WARN, ERR ]
const in_brackets = line.match(/\[\d{2}:\d{2}:\d{2}] \[([A-Z\s]+)]/)?.[1];

switch (in_brackets) {
case 'ERR ': warnings.push(line);
case 'WARN ': console.log(line);
}
});

warnings.forEach(warning => {
console.log(`::warning::${warning}`);
});

// return with exit code 1 for any warning amount
process.exit(Math.min(1, warnings.length));
60 changes: 30 additions & 30 deletions .github/actions/ci/start-server.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
// This script is responsible for relaying logs from the Minecraft server instance to the console.

const { spawn } = require('child_process');

const child = spawn(process.argv[2], [process.argv[3]]);

child.stderr.on('data', (data) => {
const line = data.toString();
process.stdout.write(line);
});

child.stdout.on('data', (data) => {
const line = data.toString();
process.stdout.write(line);

if(line.includes('[minecraft/DedicatedServer]: Done (')) {
console.log('requesting a kubejs export..');
return child.stdin.write("kubejs export\n");
}

if(line.includes('[minecraft/DedicatedServer]: Done! Export in kubejs/exported/kubejs-server-export.json')) {
console.log('exit(0)');
return process.exit(0);
}

if(line.includes('[minecraft/MinecraftServer]: Exception stopping the server')) {
console.log('exit(1)');
return process.exit(1);
}
});
// This script is responsible for relaying logs from the Minecraft server instance to the console.

const { spawn } = require('child_process');

const child = spawn(process.argv[2], [process.argv[3]]);

child.stderr.on('data', (data) => {
const line = data.toString();
process.stdout.write(line);
});

child.stdout.on('data', (data) => {
const line = data.toString();
process.stdout.write(line);

if(line.includes('[minecraft/DedicatedServer]: Done (')) {
console.log('requesting a kubejs export..');
return child.stdin.write("kubejs export\n");
}

if(line.includes('[minecraft/DedicatedServer]: Done! Export in kubejs/exported/kubejs-server-export.json')) {
console.log('exit(0)');
return process.exit(0);
}

if(line.includes('[minecraft/MinecraftServer]: Exception stopping the server')) {
console.log('exit(1)');
return process.exit(1);
}
});
26 changes: 13 additions & 13 deletions .github/no-response.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Configuration for probot-no-response - https://github.com/probot/no-response

# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 7
# Label requiring a response
responseRequiredLabel: "Status: Awaiting Information"
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author. With only the
information that is currently in the issue, we don't have enough information
to take action. Please reach out if you have or find the answers we need so
that we can investigate further.
# Configuration for probot-no-response - https://github.com/probot/no-response

# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 7
# Label requiring a response
responseRequiredLabel: "Status: Awaiting Information"
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author. With only the
information that is currently in the issue, we don't have enough information
to take action. Please reach out if you have or find the answers we need so
that we can investigate further.
Loading

0 comments on commit 6dccf66

Please sign in to comment.