55# TO ACTIVATE: cp .githooks/post-merge .git/hooks/.
66#
77# Checks:
8+ # - Changes to system requirements
9+ # - Changes to python requirements
810# - Changes to Web App
911# - Changes to web dependency
10- # - Changes to python requirements
1112#
1213# Actions are not triggered automatically as they can take some
1314# time. The user is warned if an action is required.
@@ -21,7 +22,7 @@ warn_npm_dependency() {
2122 echo " ATTENTION: npm dependencies have changed since last pull!"
2223 echo " "
2324 echo " To update dependencies and rebuilt Web App run:"
24- echo " $ cd src/webapp && ./run_rebuild.sh -u"
25+ echo " cd src/webapp && ./run_rebuild.sh -u"
2526 echo " ************************************************************"
2627 echo -e " \n"
2728}
@@ -32,7 +33,19 @@ warn_webapp() {
3233 echo " ATTENTION: Web App sources have changed since last pull!"
3334 echo " "
3435 echo " To rebuilt the Web App run:"
35- echo " $ cd src/webapp && ./run_rebuild.sh"
36+ echo " cd src/webapp && ./run_rebuild.sh"
37+ echo " ************************************************************"
38+ echo -e " \n"
39+ }
40+
41+ warn_system_requirements () {
42+ echo -e " \n"
43+ echo " ************************************************************"
44+ echo " ATTENTION: System requirements have changed since last pull!"
45+ echo " "
46+ echo " To update system requirements on the RPi run"
47+ echo " sudo apt-get -y update"
48+ echo " sed 's/#.*//g' packages-core.txt | xargs sudo apt-get -y install --no-install-recommends"
3649 echo " ************************************************************"
3750 echo -e " \n"
3851}
@@ -43,8 +56,9 @@ warn_python_requirements() {
4356 echo " ATTENTION: Python requirements have changed since last pull!"
4457 echo " "
4558 echo " To update python requirements on the RPi run"
46- echo " $ source .venv/bin/activate"
47- echo " $ python -m pip install --upgrade -r requirements.txt"
59+ echo " source .venv/bin/activate"
60+ echo " python -m pip install --upgrade -r requirements.txt"
61+ echo " python -m pip uninstall -y -r requirements-excluded.txt"
4862 echo " ************************************************************"
4963 echo -e " \n"
5064}
@@ -55,7 +69,7 @@ warn_githooks() {
5569 echo " ATTENTION: Recommended git hooks changed!"
5670 echo " "
5771 echo " To update, REVIEW and copy .githooks/* to .git/hooks"
58- echo " $ cp .githooks/* .git/hooks/."
72+ echo " cp .githooks/* .git/hooks/."
5973 echo " ************************************************************"
6074 echo -e " \n"
6175}
@@ -65,20 +79,22 @@ warn_installer() {
6579 echo " ************************************************************"
6680 echo " ATTENTION: Installer sources have changed since last pull!"
6781 echo " "
68- echo " Rerun the installer to apply changes"
69- echo " $ ./installation/install-jukebox.sh"
82+ echo " It is NOT recommended to continue the update process."
83+ echo " The installation routines have changed and"
84+ echo " compatibility with the old version is not guaranteed."
7085 echo " ************************************************************"
7186 echo -e " \n"
7287}
7388
7489# files_changed="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
90+ python_req_changed=" $( git diff --name-only --no-commit-id ORIG_HEAD HEAD requirements.txt) "
91+ python_excl_req_changed=" $( git diff --name-only --no-commit-id ORIG_HEAD HEAD requirements-excluded.txt) "
7592webapp_changed=" $( git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD src/webapp) "
7693webapp_dep_changed=" $( git diff --name-only --no-commit-id ORIG_HEAD HEAD src/webapp/package.json) "
77- python_req_changed=" $( git diff --name-only --no-commit-id ORIG_HEAD HEAD requirements.txt) "
7894githooks_changed=" $( git diff --name-only --no-commit-id ORIG_HEAD HEAD .githooks) "
7995installer_changed=" $( git diff --name-only --no-commit-id ORIG_HEAD HEAD installation) "
8096
81- if [[ -n $python_req_changed ]]; then
97+ if [[ -n $python_req_changed || -n $python_excl_req_changed ]]; then
8298 warn_python_requirements
8399fi
84100
0 commit comments