-
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
2 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Python dependencies are managed with pip-tools. This simplifies adding a new dependency. | ||
# To remove a dependency, remove it from requirements.in and run ./dev/requirements.sh recompile | ||
|
||
if [[ "$1" == "recompile"* ]]; then | ||
echo "Rebuilding from requirements.in..." | ||
elif [[ "$1" == "install"* ]]; then | ||
echo "Installing $2..." | ||
echo "$2" >> requirements.in | ||
sort -b requirements.in -o requirements.in | ||
else | ||
echo "Invalid argument. Please use 'install' or 'uninstall'." | ||
exit 1 | ||
fi | ||
|
||
docker compose run web bash -c "pip-compile --resolver=backtracking requirements.in" | ||
docker compose build web |
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The webpack container is built with node_modules in /opt/, one directory above /opt/src/ where the repo source code | ||
# is mounted. This script simplifies running `npm` commands inside the webpack container, and copies the resulting | ||
# package files up to the repo level so they can be source controlled. | ||
|
||
echo "Running '$@' in webpack container..." | ||
CMD="cd /opt/ && $@ && cp /opt/package*.json /opt/src/" | ||
docker compose run webpack bash -c "$CMD" |