forked from SinTh0r4s/HydroEnergy
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update buildscripts and minor cleanup
- Loading branch information
Showing
17 changed files
with
433 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This is the universal Text Editor Configuration | ||
# for all GTNewHorizons projects | ||
# See: https://editorconfig.org/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{bat,ini}] | ||
end_of_line = crlf | ||
|
||
[*.{dtd,json,info,mcmeta,md,sh,svg,xml,xsd,xsl,yaml,yml}] | ||
indent_size = 2 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/env bash | ||
|
||
# bashsupport disable=BP5006 # Global environment variables | ||
RUNDIR="run" \ | ||
CRASH="crash-reports" \ | ||
SERVERLOG="server.log" | ||
|
||
# enable nullglob to get 0 results when no match rather than the pattern | ||
shopt -s nullglob | ||
|
||
# store matches in array | ||
crash_reports=("$RUNDIR/$CRASH/crash"*.txt) | ||
|
||
# if array not empty there are crash_reports | ||
if [ "${#crash_reports[@]}" -gt 0 ]; then | ||
# get the latest crash_report from array | ||
latest_crash_report="${crash_reports[-1]}" | ||
{ | ||
printf 'Latest crash report detected %s:\n' "${latest_crash_report##*/}" | ||
cat "$latest_crash_report" | ||
} >&2 | ||
exit 1 | ||
fi | ||
|
||
if grep --quiet --fixed-strings 'Fatal errors were detected' "$SERVERLOG"; then | ||
{ | ||
printf 'Fatal errors detected:\n' | ||
cat server.log | ||
} >&2 | ||
exit 1 | ||
fi | ||
|
||
if grep --quiet --fixed-strings 'The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED' \ | ||
"$SERVERLOG"; then | ||
{ | ||
printf 'Server force stopped:' | ||
cat server.log | ||
} >&2 | ||
exit 1 | ||
fi | ||
|
||
if ! grep --quiet --perl-regexp --only-matching '.+Done \(.+\)\! For help, type "help" or "\?"' "$SERVERLOG"; then | ||
{ | ||
printf 'Server did not finish startup:' | ||
cat server.log | ||
} >&2 | ||
exit 1 | ||
fi | ||
|
||
printf 'No crash reports detected' | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Any Github changes require admin approval | ||
/.github/** @GTNewHorizons/admin | ||
|
Oops, something went wrong.