Skip to content

Commit 62b2f06

Browse files
committed
Merge branch 'master' into fix/cancelrequest
2 parents 522cbd0 + e602410 commit 62b2f06

File tree

318 files changed

+7065
-8164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

318 files changed

+7065
-8164
lines changed

.dev/githooks/commit-msg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ scopes_file=".dev/scopes.txt"
55

66
scopes="("
77
cat "$scopes_file" | while read a;
8-
do scopes="$scopes$a|";
8+
do test -z "$a" || [[ "$a" == \#* ]] || scopes+="$a|";
99
done;
1010
scopes="${scopes%\|})"
1111

12-
cat "$1" | grep -Eq "(fix|feat|docs|style|refactor|test|chore|rework|release)(\($scopes\))?: [a-z]"
12+
cat "$1" | grep -Eq "(fix|feat|docs|style|refactor|test|chore|rework|release)(\($scopes\))?: [0-9a-z]"
1313
result=$?
1414
if test $result -ne 0
15-
then echo "Please check that the commit message adheres to the guidelines at http://karma-runner.github.io/4.0/dev/git-commit-msg.html and matches the scopes defined in .dev/scopes.txt"
15+
then echo "Please check that the commit message adheres to the guidelines at http://karma-runner.github.io/latest/dev/git-commit-msg.html and the scope is one of $scopes as defined in $scopes_file"
1616
fi
1717
exit $result

.dev/githooks/prepare-commit-msg

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
#
3+
# This hook adds a comment for guidance about the commit message
4+
# format on top of the default commit message.
5+
#
6+
# Called by "git commit" with the name of the file that has the
7+
# commit message, followed by the description of the commit
8+
# message's source. The hook's purpose is to edit the commit
9+
# message file. If the hook fails with a non-zero status,
10+
# the commit is aborted.
11+
#
12+
# To enable this hook, set the hooksPath in git:
13+
# git config core.hooksPath .dev/githooks
14+
15+
COMMIT_MSG_FILE=$1
16+
COMMIT_SOURCE=$2
17+
SHA1=$3
18+
19+
beginswith() { case $2 in "$1"*) true;; *) false;; esac; }
20+
21+
original=$(cat "$COMMIT_MSG_FILE")
22+
if beginswith $'\n#' "$original"; then
23+
{
24+
printf "\n\n# Please enter the message in the format\n"
25+
echo "# <type>(<scope>): <description>"
26+
echo "# Possible types: fix, feat, docs, style, refactor, test, chore, rework, release"
27+
printf "# For details see https://www.notion.so/softwarechallenge/Git-217333329ea64db5b2cc8bbbaf79db87" >> "$COMMIT_MSG_FILE"
28+
echo "$original"
29+
} > "$COMMIT_MSG_FILE"
30+
fi

.dev/scopes.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ readme
22
git
33
gradle
44
travis
5+
6+
# Modules
7+
testclient
58
player
9+
server
10+
611
plugin
712
gamerules
8-
server
13+
914
sdk
1015
framework
1116
protocol
12-
testclient

.github/workflows/gradle.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on: [push, pull_request, create]
2+
jobs:
3+
build:
4+
runs-on: ubuntu-latest
5+
steps:
6+
- uses: actions/checkout@v2
7+
with:
8+
submodules: 'recursive'
9+
- name: Set up JDK
10+
uses: actions/setup-java@v1
11+
with:
12+
java-version: 8
13+
- name: Cache Gradle packages
14+
uses: actions/cache@v2
15+
with:
16+
path: ~/.gradle/caches
17+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
18+
restore-keys: ${{ runner.os }}-gradle
19+
- name: Grant execute permission for gradlew
20+
run: chmod +x gradlew
21+
- name: Execute tests
22+
run: ./gradlew check || (exitcode=$?; find build/tests -name '*.log' -type f | while read f; do echo -e "\033[4m$f\033[0m"; cat $f; done && return $exitcode)
23+
- name: Build deployment artifacts
24+
run: ./gradlew deploy
25+
- name: Upload jars as artifact
26+
uses: actions/upload-artifact@v2
27+
with:
28+
name: software-challenge-backend-${{ github.sha }}
29+
path: |
30+
build/deploy/*.zip
31+
build/deploy/*.jar
32+
release:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
if: startsWith(github.ref, 'refs/tags/')
36+
steps:
37+
- uses: actions/download-artifact@v2
38+
with:
39+
name: software-challenge-backend-${{ github.sha }}
40+
path: artifacts
41+
- name: Release ${{ github.ref }}
42+
uses: softprops/action-gh-release@v1
43+
with:
44+
files: artifacts/*
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,12 @@
1+
# Build artifacts
12
build/
2-
deploy/
3-
bin/
4-
doc/
5-
log/
63
out/
74
.gradle/
8-
.kotlintest/
9-
10-
# Copied files
11-
/server/configuration/server.properties
12-
/server/plugins
13-
/server/lib/
14-
/socha-sdk/lib/socha-sdk\.jar
15-
/players/**/lib/
16-
/plugins/**/lib/
17-
/helpers/test-client/lib/
18-
19-
# Eclipse Project files
20-
.project
21-
.metadata
22-
.classpath
23-
*.recommenders
245

256
# IntelliJ project files
267
.idea/*
278
!.idea/codeStyles/
289
*.iml
2910

30-
# Latex artifacts
31-
*.dvi
32-
*.aux
33-
*.idx
34-
*.toc
35-
*.out
36-
*.log
37-
38-
# VSCode configuration files
39-
.vscode
40-
# RVM Project Config
41-
.rvmrc
42-
43-
!gradle.properties
11+
logs/
12+
log/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule ".idea"]
2+
path = .idea
3+
url = https://github.com/CAU-Kiel-Tech-Inf/idea-config.git

.idea

Submodule .idea added at 2dfc9ca

.idea/codeStyles/Project.xml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.settings/org.eclipse.buildship.core.prefs

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)