-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_snapshot_frinexapps.sh
More file actions
48 lines (43 loc) · 2.87 KB
/
generate_snapshot_frinexapps.sh
File metadata and controls
48 lines (43 loc) · 2.87 KB
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
#!/bin/bash
# Copyright (C) 2023 Max Planck Institute for Psycholinguistics
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
# @since 13 Feb 2023 14:09 PM (creation date)
# @author Peter Withers <peter.withers@mpi.nl>
#
cd $(dirname "$0")
workingDir=$(pwd -P)
cd $(dirname "$0")/src/main/
# check that the properties to be used match the current machine
if ! grep -q $(hostname) config/publish.properties; then
echo "Aborting because the publish.properties does not match the current machine.";
else
if docker build --no-cache -f docker/frinexapps-snapshot.Dockerfile -t frinexapps-jdk:snapshot .
then
# make the snapshot XSD available by version number and alpha so that they can be used by frinex builds with frinexVersion
docker run --rm -v buildServerTarget:/FrinexBuildService/artifacts -w /ExperimentTemplate/gwt-cordova frinexapps-jdk:snapshot /bin/bash -c "cp /ExperimentTemplate/ExperimentDesigner/src/test/resources/frinex-rest-output/frinex.xsd /FrinexBuildService/artifacts/snapshot.xsd"
docker run --rm -v buildServerTarget:/FrinexBuildService/artifacts -w /ExperimentTemplate/gwt-cordova frinexapps-jdk:snapshot /bin/bash -c "cp /ExperimentTemplate/ExperimentDesigner/src/test/resources/frinex-rest-output/frinex.html /FrinexBuildService/artifacts/snapshot.html"
docker run --rm -v buildServerTarget:/FrinexBuildService/artifacts -w /FrinexBuildService frinexbuild:latest /bin/bash -c "sed -i \"s|webjars/jquery/jquery.min.js|/lib/jquery.min.js|g\" /FrinexBuildService/artifacts/snapshot.html;"
# make sure the local .m2 directory has the snapshot jar files.
docker run --rm -v m2Directory:/maven/.m2/ -w /ExperimentTemplate frinexapps-jdk:snapshot /bin/bash -c "mvn install -Djdk.xml.xpathExprGrpLimit=140 -Djdk.xml.xpathExprOpLimit=650 -Djdk.xml.xpathTotalOpLimit=150 -pl -gwt-cordova,-registration -gs /maven/.m2/settings.xml"
# report the version that has been built
latestVersion=$(docker run --rm -w /ExperimentTemplate/gwt-cordova frinexapps-jdk:snapshot /bin/bash -c "cat /ExperimentTemplate/gwt-cordova.version")
echo "the latest snapshot now is $latestVersion"
# update the frinex_examples
$workingDir/update_frinex_examples.sh "snapshot"
fi;
fi;