-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
107 additions
and
40 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
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ __pycache__/ | |
docker/data/db | ||
test/**/*.pyc | ||
configuration.json | ||
.history/ | ||
.vscode/ |
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,8 @@ | ||
# Changelog | ||
|
||
## 4.1.0 | ||
|
||
### New features | ||
* The copy entity has a new _is_rom_ field to define if the copy is a ROM or not (for emulation for instance). | ||
A migration file is available in the _migrations_ folder (see [Migrations and update guide](docs/MIGRATIONS.md)). | ||
* The copy _casingType_ field accepts a new value: _Plastic tube_. |
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 |
---|---|---|
@@ -1,33 +1,36 @@ | ||
.PHONY: test | ||
|
||
test: | ||
make import_db && docker-compose exec python bash -c 'make test_command_python' | ||
make import_db && docker compose exec python bash -c 'make test_command_python' | ||
|
||
linter: | ||
docker-compose exec python pylint --rcfile=standard.rc src/ ./app.py | ||
docker compose exec python pylint --rcfile=standard.rc src/ ./app.py | ||
|
||
start: | ||
docker-compose up | ||
docker compose up | ||
|
||
python: | ||
docker-compose exec python bash | ||
docker compose exec python bash | ||
|
||
mysql: | ||
docker-compose exec mysql bash -c 'mysql -u game -pazerty games' | ||
docker compose exec mysql bash -c 'mysql -u game -pazerty games' | ||
|
||
import_db: | ||
docker-compose exec mysql bash -c 'cd /code && make import_db_command' | ||
docker compose exec mysql bash -c 'cd /code && make import_db_command' | ||
|
||
export_db: | ||
docker-compose exec mysql bash -c 'cd /code && mysqldump -u game -pazerty games > test/games_test.sql' | ||
docker compose exec mysql bash -c 'cd /code && mysqldump -u game -pazerty games > test/games_test.sql' | ||
|
||
# updates the requirements from PIPENV (need to rebuild the pyton container after that) | ||
requirements: | ||
docker-compose exec python bash -c "cd docker/python && pipenv lock -r > ./requirements.txt" | ||
docker compose exec python bash -c "cd docker/python && pipenv lock -r > ./requirements.txt" | ||
|
||
## Containers internal command | ||
import_db_command: | ||
mysql -u game -pazerty games < test/games_test.sql | ||
|
||
test_command_python: | ||
python -m unittest discover . | ||
|
||
migration: | ||
docker compose exec mysql bash -c 'cd /code && mysql -u game -pazerty games < migrations/${FILE}.sql' |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# Use the default image. Do not use like those guys who use a Linux distro then install nginx | ||
FROM mysql:8 | ||
FROM mysql:8.0-debian | ||
|
||
# Install nano because using vi is like using a donkey at the age of intergalactic travel | ||
RUN apt-get update && apt-get -q -y install nano make |
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,9 @@ | ||
# Migrations and update guide | ||
|
||
* 1) Stop serving the application (just keep MySQL running). | ||
* 2) Get and update the source code form the last version (tip: download everything from Github and replace it in your folder). | ||
* 3) Run all the migrations you need using the following command: | ||
```make migration FILE={migration_file}``` | ||
for instance | ||
```make migration FILE=4.1.0```. | ||
* 4) Restart your server. |
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 @@ | ||
ALTER TABLE copies ADD is_rom TINYINT UNSIGNED NOT NULL DEFAULT 0 AFTER type; |
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
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