Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine-core
Commits
cb1d4a56
Commit
cb1d4a56
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Default run targets "core" and "debug".
engine#72
parent
07669b18
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
run.sh
+9
-44
9 additions, 44 deletions
run.sh
with
9 additions
and
44 deletions
run.sh
+
9
−
44
View file @
cb1d4a56
#!/bin/bash
mode
=
"
engin
e"
mode
=
"
cor
e"
docker
=
"false"
#
...
...
@@ -7,19 +7,15 @@ docker="false"
#
# Call with one of these parameters:
#
# - init
# - engine
# - core
# - lqs
# - test
# - recreate-database
# - debug
# - docker:
engin
e
# - docker:
cor
e
# - docker:build
# - docker:push
#
if
[[
$*
=
~ ^
(
init|env|engine|core|lqs|test|recreate-database
)
$
]]
;
then
if
[[
$*
=
~ ^
(
core|debug
)
$
]]
;
then
mode
=
$1
fi
...
...
@@ -33,52 +29,21 @@ echo "[ Run mode=$mode ]"
echo
"[ Docker=
$docker
]"
# Check for the correct Python version (3.8+)
PYTHON_EXEC
=
"python3"
echo
"[ Using
$(
python3
-V
)
]"
# +++ DEFAULT COMMANDS +++ #
if
[[
$docker
==
"false"
]]
;
then
### Initializes the environment & installs dependencies ###
if
[[
$mode
==
"init"
]]
;
then
mkdir
-p
logs
pip3
install
-r
requirements.txt
fi
### Runs Engine Core & Liquidsoap ###
if
[[
$mode
==
"engine"
]]
;
then
eval
$(
opam
env
)
/usr/bin/env
$PYTHON_EXEC
run.py
fi
### Runs Engine Core only ###
### Runs Engine Core (Liquidsoap) ###
if
[[
$mode
==
"core"
]]
;
then
/usr/bin/env
$PYTHON_EXEC
run.py
--without-lqs
fi
### Runs Liquidsoap only ###
if
[[
$mode
==
"lqs"
]]
;
then
lqs
=
$(
/usr/bin/env
$PYTHON_EXEC
run.py
--get-lqs-command
)
eval
"
$lqs
"
fi
### Runs Tests ###
if
[[
$mode
==
"test"
]]
;
then
/usr/bin/env
$PYTHON_EXEC
-m
unittest discover tests
(
cd
src
&&
liquidsoap ./engine.liq
)
fi
###
CAUTION: This deletes everythi
ng
in
your database
###
###
Runs E
ngin
e Core (Verbose & debug output)
###
if
[[
$mode
==
"
recreate-database
"
]]
;
then
/usr/bin/env
$PYTHON_EXEC
run.py
--recreate-database
if
[[
$mode
==
"
debug
"
]]
;
then
(
cd
src
&&
liquidsoap
--verbose
--debug
./engine.liq
)
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment