Skip to content

Commit 45f269d

Browse files
authored
Architecture rework (#10)
* Experimental, non working draft of the rework * Tested some solutions for a problem * Fixed event action calling * Reworked architecture and added Plugin structure * Implemented HTTP listener and removed registration project * Moved commandFactory to model * Fixed registration * Fixed command functionality. Basic spotify features in working shape * Added information about the success of the registration * Fixed wrong import path * Fixed import paths (see previous commit)
1 parent 5517a7d commit 45f269d

Some content is hidden

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

57 files changed

+1671
-972
lines changed

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ on:
1414
pull_request:
1515

1616
env:
17-
BOT_IMAGE_NAME: playback-enq-bot
18-
REIGSTRATION_IMAGE_NAME: playback-enq-reg
17+
BOT_IMAGE_NAME: bot
1918

2019
jobs:
2120
# Run tests.
@@ -32,8 +31,7 @@ jobs:
3231
docker-compose --file docker-compose.test.yml build
3332
docker-compose --file docker-compose.test.yml run sut
3433
else
35-
docker build ./bot --file ./bot/Dockerfile
36-
docker build ./registration --file ./registration/Dockerfile
34+
docker build .
3735
fi
3836
3937
# Push image to GitHub Packages.
@@ -49,10 +47,7 @@ jobs:
4947
- uses: actions/checkout@v2
5048

5149
- name: Build bot image
52-
run: docker build ./bot --file ./bot/Dockerfile --tag $BOT_IMAGE_NAME
53-
54-
- name: Build register image
55-
run: docker build ./bot --file ./registration/Dockerfile --tag $REIGSTRATION_IMAGE_NAME
50+
run: docker build . --tag $BOT_IMAGE_NAME
5651

5752
- name: Log into registry
5853
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
@@ -79,28 +74,6 @@ jobs:
7974
docker tag $BOT_IMAGE_NAME $IMAGE_ID:$VERSION
8075
docker push $IMAGE_ID:$VERSION
8176
82-
83-
- name: Push registration image
84-
run: |
85-
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$REIGSTRATION_IMAGE_NAME
86-
87-
# Change all uppercase to lowercase
88-
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
89-
90-
# Strip git ref prefix from version
91-
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
92-
93-
# Strip "v" prefix from tag name
94-
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
95-
96-
# Use Docker `latest` tag convention
97-
[ "$VERSION" == "master" ] && VERSION=latest
98-
99-
echo IMAGE_ID=$IMAGE_ID
100-
echo VERSION=$VERSION
101-
102-
docker tag $REIGSTRATION_IMAGE_NAME $IMAGE_ID:$VERSION
103-
docker push $IMAGE_ID:$VERSION
10477
10578
- name: Delete builder images
10679
run: |
File renamed without changes.

bot/src/commandFramework/constructorRegistry.ts

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

bot/src/commandFramework/index.ts

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

bot/src/commandFramework/interfaces.ts

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

bot/src/controller/commandHandler.ts

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

bot/src/controller/httpController.ts

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

bot/src/dependencyInjection/index.ts

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

bot/src/dependencyInjection/inversify.config.ts

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

bot/src/dependencyInjection/types.ts

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

0 commit comments

Comments
 (0)