Skip to content

Commit

Permalink
Merge pull request #38 from Tastyep/install-deps-on-setup
Browse files Browse the repository at this point in the history
install-deps-on-setup #comment Add deps subcommand, in charge of inst…
  • Loading branch information
Tastyep authored Sep 12, 2020
2 parents b875368 + be3b977 commit 0d5b2ca
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
1 change: 1 addition & 0 deletions OpenCast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# ./OpenCast.sh command [<args>...]
#
# Commands:
# deps Interact with dependencies.
# format Run formatters on the source code.
# generate Generate content.
# lint Lint the source code.
Expand Down
3 changes: 1 addition & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ install_project_deps() {
log_info "Installing project dependencies..."

curl -sSL "https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py" | python3
"$ROOT/$INTERNAL_NAME.sh" service back update
(cd "$ROOT/webapp" && npm install)
"$ROOT/$INTERNAL_NAME.sh" deps install
}

# Format and install the systemd config file.
Expand Down
27 changes: 27 additions & 0 deletions tool/deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Usage:
# ./deps.sh command
#
# Commands:
# install Install all dependencies.
# update Update python dependencies.

HERE="$(cd "$(dirname "${BASH_SOURCE:-0}")" && pwd)"
ROOT="$(cd "$HERE/.." && pwd)"

# shellcheck source=script/cli_builder.sh
source "$ROOT/script/cli_builder.sh"
# shellcheck source=script/env.sh
source "$ROOT/script/env.sh"

install() {
(cd "$ROOT" && poetry install)
(cd "$ROOT/webapp" && npm install)
}

update() {
(cd "$ROOT" && poetry update)
}

parse_args "$@"
${ARGS["command"]}
7 changes: 0 additions & 7 deletions tool/service-back.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# stop Stop the service.
# restart Restart the service.
# status Display the status of the service.
# update Update the dependencies of the service.

HERE="$(cd "$(dirname "${BASH_SOURCE:-0}")" && pwd)"
ROOT="$(cd "$HERE/.." && pwd)"
Expand Down Expand Up @@ -54,11 +53,5 @@ status() {
log_status "$SERVICE_NAME" "$status"
}

update() {
log_info "Checking for updates."

poetry update
}

parse_args "$@"
${ARGS["command"]}

0 comments on commit 0d5b2ca

Please sign in to comment.