-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
120 lines (95 loc) · 4.27 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
VERSION = ""
build-all: build-admin build-access
build-admin: setup-build-dirs build-admin-npm build-admin-concat
build-access: setup-build-dirs build-access-npm build-access-concat
setup-build-dirs:
mkdir -p static/build/admin/
mkdir -p static/assets/admin/
mkdir -p static/build/access/
mkdir -p static/assets/access/
build-admin-concat:
rm -rf static/build/admin/*
rm -f static/assets/admin/cdr-admin.*
cat static/js/admin/lib/jquery.min.js > static/build/admin/cdr-admin.js
echo "define('jquery-ui', ['jquery'], function ($$) {" >> static/build/admin/cdr-admin.js
cat static/js/admin/lib/jquery-ui.min.js >> static/build/admin/cdr-admin.js
echo "});" >> static/build/admin/cdr-admin.js
awk 'FNR==1 && NR!=1 {print ""} {print}' \
static/js/admin/lib/jquery.detachplus.js \
static/js/admin/lib/moment.min.js \
static/js/public/src/Structure* \
static/js/public/src/ResourceTypeUtilities.js \
static/js/admin/src/*.js \
static/js/admin/src/*/*.js \
>> static/build/admin/cdr-admin.js
sass static/css/sass/cdr_vue_modal_styles.scss static/build/admin/cdr_vue_modal_styles.css --style "expanded"
awk 'FNR==1 && NR!=1 {print ""} {print}' \
static/css/reset.css \
static/css/cdr_common.css \
static/css/admin/jquery-ui.css \
static/css/admin/jquery.qtip.css \
static/css/admin/jquery.contextMenu.css \
static/css/admin/jquery.xmleditor.css \
static/css/admin/cdradmin.css \
static/css/admin/search_results.css \
static/css/admin/admin_forms.css \
static/css/fontawesome.min.css \
static/css/structure_browse.css \
static/css/admin/status_monitor.css \
static/build/admin/cdr_vue_modal_styles.css \
static/js/admin/vue-cdr-admin/dist/assets/index.css \
> static/build/admin/cdr-admin.css
cp static/build/admin/cdr-admin.js static/assets/admin/
cp static/build/admin/cdr-admin.css static/assets/admin/
cp -r static/css/images static/assets/admin/
ifneq ($(VERSION), "")
for i in static/js/admin/*.js; do \
sed "s/\(urlArgs *: *\)\".*\"/\1\"v=$(VERSION)\"/" $$i > $$i.temp; \
mv $$i.temp $$i; \
done
endif
build-admin-npm:
rm -f static/assets/admin/vue-admin-index.js
# Build vue admin application files
npm --prefix static/js/admin/vue-cdr-admin ci
npm --prefix static/js/admin/vue-cdr-admin run build
cp static/js/admin/vue-cdr-admin/dist/assets/vue-admin-index.js static/assets/admin/vue-admin-index.js
build-access-concat:
rm -rf static/build/access/*
rm -f static/assets/access/cdr-access.*
awk 'FNR==1 && NR!=1 {print ""} {print}' \
static/css/sass/cdr_homepage.scss \
static/css/sass/cdr_ui_styles.scss \
static/css/sass/cdr_vue_modal_styles.scss \
> static/build/access/cdr-ui.scss
sass static/build/access/cdr-ui.scss static/build/access/cdr-ui.css --style "expanded"
awk 'FNR==1 && NR!=1 {print ""} {print}' \
static/css/bulma-no-dark-mode.min.css \
static/css/cdrui_styles.css \
static/build/access/cdr-ui.css \
static/css/fontawesome.min.css \
static/js/vue-cdr-access/dist/assets/index.css \
> static/build/access/cdr-access.css
cp static/build/access/cdr-access.css static/assets/access/
cp -r static/webfonts static/assets/
SUSPEND = "n"
build-access-npm:
rm -f static/assets/access/vue-access-index.js
# Build vue application(s) files
npm --prefix static/js/vue-cdr-access ci
npm --prefix static/js/vue-cdr-access run build
# Minify viewer.js file for pdf viewer (Uncomment the lines below if changes are made to the viewer.js file. Requires nodejs 15.x or higher)
# npm install minify -g
# minify static/plugins/pdfjs/web/viewer.js > static/plugins/pdfjs/web/viewer.min.js
cp static/js/vue-cdr-access/dist/assets/vue-access-index.js static/assets/access/vue-access-index.js
SUSPEND = "n"
build-bxc:
mvn clean install -DskipTests -pl common-utils,access,access-common,admin,deposit,fcrepo-clients,metadata,model-api,model-fcrepo,persistence,auth-api,auth-fcrepo,services,services-camel,indexing-solr,solr-search,sword-server,integration
verify-bxc:
mvn verify -pl common-utils,access,access-common,admin,deposit,fcrepo-clients,metadata,model-api,model-fcrepo,persistence,auth-api,auth-fcrepo,services,services-camel,indexing-solr,solr-search,sword-server,integration
ifneq ($(VERSION), "")
for i in static/js/public/*.js; do \
sed "s/\(urlArgs *: *\)\".*\"/\1\"v=$(VERSION)\"/" $$i > $$i.temp; \
mv $$i.temp $$i; \
done
endif