From c66d6328d61083db136bd9213a44696073c62914 Mon Sep 17 00:00:00 2001
From: Dan Scott <dscott@laurentian.ca>
Date: Tue, 11 Apr 2017 20:21:56 -0400
Subject: [PATCH] LP#1680624 Remove bower packaging bits

We no longer need to install bower as part of the Makefile.install
targets or worry about the bower_components cache directory when
generating a release. Rip out those references.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <ben@evergreener.net>
---
 Open-ILS/src/extras/install/Makefile.common        | 1 -
 Open-ILS/src/extras/install/Makefile.debian-jessie | 5 ++---
 Open-ILS/src/extras/install/Makefile.ubuntu-trusty | 5 ++---
 Open-ILS/src/extras/install/Makefile.ubuntu-xenial | 5 ++---
 build/tools/make_release                           | 7 +++----
 5 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/Open-ILS/src/extras/install/Makefile.common b/Open-ILS/src/extras/install/Makefile.common
index 81dd53c7d1..20bdb07ce1 100644
--- a/Open-ILS/src/extras/install/Makefile.common
+++ b/Open-ILS/src/extras/install/Makefile.common
@@ -36,7 +36,6 @@ install_nodejs_from_source:
 	./configure && make && make install
 	npm update
 	npm install -g grunt-cli
-	npm install -g bower
 
 clean:
 	make -C $(LIBDBI) clean
diff --git a/Open-ILS/src/extras/install/Makefile.debian-jessie b/Open-ILS/src/extras/install/Makefile.debian-jessie
index 945ba203be..53039fbbf8 100644
--- a/Open-ILS/src/extras/install/Makefile.debian-jessie
+++ b/Open-ILS/src/extras/install/Makefile.debian-jessie
@@ -146,13 +146,12 @@ all:
 install_postgres_server:
 	make -f $(DIR)/Makefile.debian DEBS="$(PGSQL_SERVER_DEBS_94)"
 
-# note: if/when grunt-cli and bower are available as 
-# packages, use the packaged versions instead.
+# note: if/when grunt-cli is available as a
+# package, use the packaged version instead.
 install_developer:
 	make -f $(DIR)/Makefile.debian DEBS="$(DEVELOPER_DEBS)"
 	npm update
 	npm install -g grunt-cli
-	npm install -g bower
 
 install_translator: install_developer
 	make -f $(DIR)/Makefile.debian DEBS="$(TRANSLATOR_DEBS)"
diff --git a/Open-ILS/src/extras/install/Makefile.ubuntu-trusty b/Open-ILS/src/extras/install/Makefile.ubuntu-trusty
index bcddd7e58e..385c342e5b 100644
--- a/Open-ILS/src/extras/install/Makefile.ubuntu-trusty
+++ b/Open-ILS/src/extras/install/Makefile.ubuntu-trusty
@@ -152,13 +152,12 @@ all:
 install_postgres_server:
 	make -f $(DIR)/Makefile.debian DEBS="$(PGSQL_SERVER_DEBS_94)"
 
-# note: if/when grunt-cli and bower are available as 
-# packages, use the packaged versions instead.
+# note: if/when grunt-cli is available as a
+# package, use the packaged version instead.
 install_developer:
 	make -f $(DIR)/Makefile.debian DEBS="$(DEVELOPER_DEBS)"
 	npm update
 	npm install -g grunt-cli
-	npm install -g bower
 
 install_translator: install_developer
 	make -f $(DIR)/Makefile.debian DEBS="$(TRANSLATOR_DEBS)"
diff --git a/Open-ILS/src/extras/install/Makefile.ubuntu-xenial b/Open-ILS/src/extras/install/Makefile.ubuntu-xenial
index ead590f273..ca0cdf3f39 100644
--- a/Open-ILS/src/extras/install/Makefile.ubuntu-xenial
+++ b/Open-ILS/src/extras/install/Makefile.ubuntu-xenial
@@ -145,13 +145,12 @@ all:
 install_postgres_server:
 	make -f $(DIR)/Makefile.debian DEBS="$(PGSQL_SERVER_DEBS_95)"
 
-# note: if/when grunt-cli and bower are available as 
-# packages, use the packaged versions instead.
+# note: if/when grunt-cli is available as a
+# package, use the packaged version instead.
 install_developer:
 	make -f $(DIR)/Makefile.debian DEBS="$(DEVELOPER_DEBS)"
 	npm update
 	npm install -g grunt-cli
-	npm install -g bower
 
 install_translator: install_developer
 	make -f $(DIR)/Makefile.debian DEBS="$(TRANSLATOR_DEBS)"
diff --git a/build/tools/make_release b/build/tools/make_release
index 058ae5f153..2fc6f65c24 100755
--- a/build/tools/make_release
+++ b/build/tools/make_release
@@ -79,7 +79,7 @@ while getopts ":hv:f:F:nptbrij:c" opt; do
             echo "   -r prompt to preview upgrade SQL in editor before committing."
             echo "   -i skip i18n; primarily useful for (quickly) testing this script."
             echo "   -j opensrf javascript library path.  If osrf_config is found, the value derived from osrf_config --libdir."
-            echo "   -c build the experimental browser client;  requires nodejs/grunt-cli/bower"
+            echo "   -c build the experimental browser client;  requires nodejs/grunt-cli"
             echo "   NOTE: -t and -b override PREV_BRANCH/PREV_VERSION, but -b overrides -t."
             exit -1
         ;;
@@ -331,10 +331,9 @@ if [ "$BUILD_BROWSER_CLIENT" == "YES" ]; then
     echo "Building browser staff client"
     cd Open-ILS/web/js/ui/default/staff/
     npm install   # fetch build dependencies
-    bower install # fetch JS dependencies
     grunt build # copy to build dir and minify JS files
-    # bower / node cache is big and unnecessary in the final build.  remove them.
-    rm -r bower_components node_modules 
+    # npm cache is big and unnecessary in the final build. remove it.
+    rm -r node_modules 
     cd ../../../../../../../ # release dir
 else
     echo "Skipping browser client build"
-- 
2.11.0