Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-webui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-webui
Commits
9352ce57
Verified
Commit
9352ce57
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
ADD build properties AUTO_DISCOVER_MODULES, JS_DIST_BUNDLE
parent
941271a7
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!36
merge f-boot-tour to dev
Pipeline
#8776
passed with warnings
3 years ago
Stage: linting
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
build.properties.d/00_default.properties
+12
-0
12 additions, 0 deletions
build.properties.d/00_default.properties
misc/merge_js.sh
+9
-7
9 additions, 7 deletions
misc/merge_js.sh
with
22 additions
and
8 deletions
Makefile
+
1
−
1
View file @
9352ce57
...
@@ -69,7 +69,7 @@ merge_xsl:
...
@@ -69,7 +69,7 @@ merge_xsl:
merge_js
:
merge_js
:
for
f
in
${
BUILDFILELIST
}
;
do
source
"
$$
f"
;
done
;
\
for
f
in
${
BUILDFILELIST
}
;
do
source
"
$$
f"
;
done
;
\
BUILD_
JS_DIST_BUNDLE
=
$${
BUILD_
JS_DIST_BUNDLE
}
misc/merge_js.sh
$${
MODULE_DEPENDENCIES[
*
]
}
JS_DIST_BUNDLE
=
$${
JS_DIST_BUNDLE
}
AUTO_DISCOVER_MODULES
=
$$
AUTO_DISCOVER_MODULES
misc/merge_js.sh
$${
MODULE_DEPENDENCIES[
*
]
}
EXCLUDE_EXPR
=
%~ %.backup
EXCLUDE_EXPR
=
%~ %.backup
BUILDFILELIST
=
$(
filter-out
$(
EXCLUDE_EXPR
)
,
$(
wildcard build.properties.d/
*
))
BUILDFILELIST
=
$(
filter-out
$(
EXCLUDE_EXPR
)
,
$(
wildcard build.properties.d/
*
))
...
...
This diff is collapsed.
Click to expand it.
build.properties.d/00_default.properties
+
12
−
0
View file @
9352ce57
...
@@ -91,6 +91,18 @@ BUILD_CUSTOM_IMPRINT='<p> Put an imprint note here </p>'
...
@@ -91,6 +91,18 @@ BUILD_CUSTOM_IMPRINT='<p> Put an imprint note here </p>'
##############################################################################
##############################################################################
BUILD_MODULE_EXT_TRIGGER_CRAWLER_FORM_TOOLBOX
=
"Tools"
BUILD_MODULE_EXT_TRIGGER_CRAWLER_FORM_TOOLBOX
=
"Tools"
##############################################################################
# Build a dist file containing all JS code from the files in the
# MODULE_DEPENDENCIES array.
##############################################################################
JS_DIST_BUNDLE
=
TRUE
##############################################################################
# TRUE means that all javascript sources which are no mentioned in the
# MODULE_DEPENDENCIES array will be added in no particular order into the
# build. If you need to guarantee a specific order (in which the are loaded or
# appear in the dit file) you need to add them to the MODULE_DEPENDENCIES.
##############################################################################
AUTO_DISCOVER_MODULES
=
TRUE
##############################################################################
##############################################################################
# Module dependencies
# Module dependencies
# Override or extend to specify the order of js files in the resulting
# Override or extend to specify the order of js files in the resulting
...
...
This diff is collapsed.
Click to expand it.
misc/merge_js.sh
+
9
−
7
View file @
9352ce57
...
@@ -41,7 +41,7 @@ ALL_SOURCES=()
...
@@ -41,7 +41,7 @@ ALL_SOURCES=()
_create_jsheader
()
{
_create_jsheader
()
{
_JS_INCLUDE
=
_JS_INCLUDE
=
if
[
"
$
BUILD_
JS_DIST_BUNDLE
"
==
"TRUE"
]
;
then
if
[
"
$JS_DIST_BUNDLE
"
==
"TRUE"
]
;
then
_SIZE
=
$((
$(
wc
-c
${
DIST_BUNDLE_TARGET
}
|
awk
'{print $1}'
)
/
1024
))
_SIZE
=
$((
$(
wc
-c
${
DIST_BUNDLE_TARGET
}
|
awk
'{print $1}'
)
/
1024
))
echo
"including
${
DIST_BUNDLE
}
(
${
_SIZE
}
kB) into
${
JSHEADER_TARGET
}
"
echo
"including
${
DIST_BUNDLE
}
(
${
_SIZE
}
kB) into
${
JSHEADER_TARGET
}
"
_JS_INCLUDE
=
"
_JS_INCLUDE
=
"
...
@@ -85,7 +85,7 @@ _create_jsheader () {
...
@@ -85,7 +85,7 @@ _create_jsheader () {
}
}
function
_merge
()
{
function
_merge
()
{
if
[
"
$
BUILD_
JS_DIST_BUNDLE
"
!=
"TRUE"
]
;
then
if
[
"
$JS_DIST_BUNDLE
"
!=
"TRUE"
]
;
then
return
0
return
0
fi
fi
_SOURCE
=
$2
_SOURCE
=
$2
...
@@ -110,11 +110,13 @@ for _SOURCE in ${CORE_MODULES[@]} ; do
...
@@ -110,11 +110,13 @@ for _SOURCE in ${CORE_MODULES[@]} ; do
_merge
"core"
"
${
PUBLIC_JS_DIR
}${
_SOURCE
}
"
$DIST_BUNDLE_TARGET
_merge
"core"
"
${
PUBLIC_JS_DIR
}${
_SOURCE
}
"
$DIST_BUNDLE_TARGET
done
done
# load other js files but exclude any subdirectory
if
[
"
$AUTO_DISCOVER_MODULES
"
==
"TRUE"
]
;
then
for
_SOURCE
in
$(
find
${
PUBLIC_JS_DIR
}*
-prune
-iname
"*.js"
)
;
do
# load other js files but exclude any subdirectory
[[
!
"
${
ALL_SOURCES
[@]
}
"
=
~
"
${
_SOURCE
}
"
]]
&&
ALL_SOURCES+
=(
${
_SOURCE
}
)
for
_SOURCE
in
$(
find
${
PUBLIC_JS_DIR
}*
-prune
-iname
"*.js"
)
;
do
_merge
"extension"
${
_SOURCE
}
$DIST_BUNDLE_TARGET
[[
!
"
${
ALL_SOURCES
[@]
}
"
=
~
"
${
_SOURCE
}
"
]]
&&
ALL_SOURCES+
=(
${
_SOURCE
}
)
done
_merge
"extension"
${
_SOURCE
}
$DIST_BUNDLE_TARGET
done
fi
# for `make test`
# for `make test`
for
_SOURCE
in
$(
find
${
PUBLIC_JS_DIR
}
-ipath
"
${
PUBLIC_JS_DIR
}
modules/*.js"
)
;
do
for
_SOURCE
in
$(
find
${
PUBLIC_JS_DIR
}
-ipath
"
${
PUBLIC_JS_DIR
}
modules/*.js"
)
;
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment