-
Notifications
You must be signed in to change notification settings - Fork 3
/
transmartApp-build.sh
executable file
·1539 lines (1196 loc) · 33 KB
/
transmartApp-build.sh
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
# Check we have maven installed
if ! type mvn >/dev/null 2>&1; then
echo "maven required but mvn does not exist"
exit 1
fi
# Check we have java installed
if ! type java >/dev/null 2>&1; then
echo "java required but java does not exist"
exit 1
fi
export JAVA_OPTS="$JAVA_OPTS -Xms2048m -Xmx8192m"
PREFIX="build"
OUT=`pwd`
clean=1
cleangrails=0
sleeptime=0
buildapi=0
buildshared=0
buildlegacy=0
buildfractalis=0
builddas=0
builddalliance=0
buildcore=0
buildcoretests=0
buildmydas=0
buildjava=0
buildbiomart=0
buildsearch=0
buildrestapi=0
buildcustom=0
buildfolder=0
buildrmodules=0
buildauth=0
buildipa=0
buildsmartr=0
buildgalaxy=0
buildmetacore=0
buildxnatimport=0
buildxnatviewer=0
buildgwas=0
buildplink=0
buildi2b2core=0
buildgnome=0
buildworkspace=0
buildi2b2=0
buildgwava=0
buildwar=0
# By default, build war file from transmartApp
build="war"
buildb=""
buildc=""
usagelist="war all api shared legacy fractalis das dalliance core coretests mydas java biomart search rest custom folder rmodules auth ipa smartr galaxy metacore xnatimport xnatviewer gwas plink gnome i2b2core i2b2 workspace gwava"
if [ "$1" != "" ] ; then
arg="$1"
echo "Argument '$arg'"
if [ "$arg" == "-noclean" ] ; then
clean=0
elif [ "$arg" == "-clean" ] ; then
clean=1
elif [ "$arg" == "-nocleangrails" ] ; then
cleangrails=0
elif [ "$arg" == "-cleangrails" ] ; then
cleangrails=1
else
build=""
for item in $usagelist
do
if [ "$arg" == "$item" ]; then
build=$arg
break
fi
done
if [ -z "$build" ] ; then
echo "Usage: transmartAppBuild.sh [ $usagelist ] -[no]clean -[no]cleangrails"
exit
fi
fi
fi
if [ "$2" != "" ] ; then
arg="$2"
echo "Argument '$arg'"
if [ "$arg" == "-noclean" ] ; then
clean=0
elif [ "$arg" == "-clean" ] ; then
clean=1
elif [ "$arg" == "-nocleangrails" ] ; then
cleangrails=0
elif [ "$arg" == "-cleangrails" ] ; then
cleangrails=1
else
for item in $usagelist
do
if [ "$arg" == "$item" ]; then
buildb=$arg
break
fi
done
if [ -z "$buildb" ] ; then
echo "Usage: transmartAppBuild.sh [ $usagelist ] -[no]clean -[no]cleangrails"
exit
fi
fi
fi
if [ "$3" != "" ] ; then
arg="$3"
echo "Argument '$arg'"
if [ "$arg" == "-noclean" ] ; then
clean=0
elif [ "$arg" == "-clean" ] ; then
clean=1
elif [ "$arg" == "-nocleangrails" ] ; then
cleangrails=0
elif [ "$arg" == "-cleangrails" ] ; then
cleangrails=1
else
for item in $usagelist
do
if [ "$arg" == "$item" ]; then
buildc=$arg
break
fi
done
if [ -z "$buildc" ] ; then
echo "Usage: transmartAppBuild.sh [ $usagelist ] -[no]clean -[no]cleangrails"
exit
fi
fi
fi
#dependencies:
# war <- rmodules
# war <- gwas <- folder <- search <- biomart <- java
# <- legacy
# war <- galaxy <- rmodules
# <- legacy
# war <- galaxy <- gwas <- folder <- search <- biomart <- java
# <- legacy
if [ "$build" == "war" ] || [ "$buildb" == "war" ] ; then
buildwar=1
fi
if [ "$build" == "all" ] || [ "$buildb" == "all" ] ; then
buildapi=1 # 01-core-api
buildshared=1 # 02-transmart-shared
buildlegacy=1 # 03-transmart-legacy-db
buildfractalis=1 # 05-transmart-fractalis
builddas=1 # 08-mydas
builddalliance=1 # 09-dalliance-plugin
buildcore=1 # 11-transmart-core-db
buildcoretests=1 # 12-transmart-core-db-tests
buildmydas=1 # 13-transmart-mydas
buildjava=1 # 21-transmart-java
buildbiomart=1 # 22-biomart-domain
buildsearch=1 # 23-search-domain
buildrestapi=1 # 24-transmart-rest-api
buildcustom=1 # 31-transmart-custom
buildfolder=1 # 32-folder-management-plugin
buildmetacore=1 # 33-transmart-metacore-plugin
buildrmodules=1 # 34-Rmodules
buildauth=1 # 41-spring-security-auth0
buildipa=1 # 51-IpaIpi
buildsmartr=1 # 52-SmartR
buildgalaxy=1 # 61-galaxy-export-plugin
buildxnatviewer=1 # 71-transmart-xnat-viewer
buildxnatimport=1 # 72-transmart-xnat-importer-plugin
buildgwas=1 # 81-transmart-gwas-plugin
buildplink=1 # 82-transmart-gwas-plink
# buildgnome=1
# buildi2b2core=1
fi
if [ "$build" == "api" ] || [ "$buildb" == "api" ] || [ "$buildc" == "api" ] ; then
buildapi=1
fi
if [ "$build" == "shared" ] || [ "$buildb" == "shared" ] || [ "$buildc" == "shared" ] ; then
buildshared=1
fi
if [ "$build" == "legacy" ] || [ "$buildb" == "legacy" ] || [ "$buildc" == "legacy" ] ; then
buildlegacy=1
fi
if [ "$build" == "fractalis" ] || [ "$buildb" == "fractalis" ] || [ "$buildc" == "fractalis" ] ; then
buildfractalis=1
fi
if [ "$build" == "das" ] || [ "$buildb" == "das" ] || [ "$buildc" == "das" ] ; then
builddas=1
fi
if [ "$build" == "dalliance" ] || [ "$buildb" == "dalliance" ] || [ "$buildc" == "dalliance" ] ; then
builddalliance=1
fi
if [ "$build" == "core" ] || [ "$buildb" == "core" ] || [ "$buildc" == "core" ] ; then
buildcore=1
fi
if [ "$build" == "coretests" ] || [ "$buildb" == "coretests" ] || [ "$buildc" == "coretests" ] ; then
buildcoretests=1
fi
if [ "$build" == "mydas" ] || [ "$buildb" == "mydas" ] || [ "$buildc" == "mydas" ] ; then
buildmydas=1
fi
if [ "$build" == "java" ] || [ "$buildb" == "java" ] || [ "$buildc" == "java" ] ; then
buildjava=1
fi
if [ "$build" == "biomart" ] || [ "$buildb" == "biomart" ] || [ "$buildc" == "biomart" ] ; then
buildbiomart=1
fi
if [ "$build" == "search" ] || [ "$buildb" == "search" ] || [ "$buildc" == "search" ] ; then
buildsearch=1
fi
if [ "$build" == "rest" ] || [ "$buildb" == "rest" ] || [ "$buildc" == "rest" ] ; then
buildrestapi=1
fi
if [ "$build" == "custom" ] || [ "$buildb" == "custom" ] || [ "$buildc" == "custom" ] ; then
buildcustom=1
fi
if [ "$build" == "folder" ] || [ "$buildb" == "folder" ] || [ "$buildc" == "folder" ] ; then
buildfolder=1
fi
if [ "$build" == "rmodules" ] || [ "$buildb" == "rmodules" ] || [ "$buildc" == "rmodules" ] ; then
buildrmodules=1
fi
if [ "$build" == "auth" ] || [ "$buildb" == "auth" ] || [ "$buildc" == "auth" ] ; then
buildauth=1
fi
if [ "$build" == "ipa" ] || [ "$buildb" == "ipa" ] || [ "$buildc" == "ipa" ] ; then
buildipa=1
fi
if [ "$build" == "smartr" ] || [ "$buildb" == "smartr" ] || [ "$buildc" == "smartr" ] ; then
buildsmartr=1
fi
if [ "$build" == "galaxy" ] || [ "$buildb" == "galaxy" ] || [ "$buildc" == "galaxy" ] ; then
buildgalaxy=1
fi
if [ "$build" == "metacore" ] || [ "$buildb" == "metacore" ] || [ "$buildc" == "metacore" ] ; then
buildmetacore=1
fi
if [ "$build" == "xnatimport" ] || [ "$buildb" == "xnatimport" ] || [ "$buildc" == "xnatimport" ] ; then
buildxnatimport=1
fi
if [ "$build" == "xnatviewer" ] || [ "$buildb" == "xnatviewer" ] || [ "$buildc" == "xnatviewer" ] ; then
buildxnatviewer=1
fi
if [ "$build" == "gwas" ] || [ "$buildb" == "gwas" ] || [ "$buildc" == "gwas" ] ; then
buildgwas=1
fi
if [ "$build" == "plink" ] || [ "$buildb" == "plink" ] || [ "$buildc" == "plink" ] ; then
buildplink=1
fi
if [ "$build" == "gnome" ] || [ "$buildb" == "gnome" ] || [ "$buildc" == "gnome" ] ; then
buildgnome=1
fi
if [ "$build" == "i2b2core" ] || [ "$buildb" == "i2b2core" ] || [ "$buildc" == "i2b2core" ] ; then
buildi2b2core=1
fi
if [ "$build" == "i2b2" ] || [ "$buildb" == "i2b2" ] || [ "$buildc" == "i2b2" ] ; then
buildi2b2=1
fi
if [ "$build" == "workspace" ] || [ "$buildb" == "workspace" ] || [ "$buildc" == "workspace" ] ; then
buildworkspace=1
fi
# dependencies on other builds
# make sure any that depends on this build are rebuilt after
if [ $buildapi == 1 ] ; then
buildcore=1
buildcoretests=1
buildmydas=1
buildrmodules=1
buildsmartr=1
buildxnatviewer=1
buildrestapi=1
fi
if [ $buildshared == 1 ] ; then
buildcore=1
buildsearch=1
buildcustom=1
buildgwas=1
buildauth=1
buildmetacore=1
buildgalaxy=1
buildrmodules=1
buildxnatimport=1
buildrestapi=1
fi
if [ $buildlegacy == 1 ] ; then
buildgalaxy=1
buildgwas=1
fi
if [ $buildfractalis == 1 ] ; then
:
fi
if [ $builddas == 1 ] ; then
buildmydas=1
fi
if [ $builddalliance == 1 ] ; then
:
fi
if [ $buildcore == 1 ] ; then
buildcoretests=1
buildgwas=1
buildfolder=1
buildauth=1
buildsmartr=1
buildrestapi=1
fi
if [ $buildcoretests == 1 ] ; then
buildsmartr=1
buildrestapi=1
fi
if [ $buildmydas == 1 ] ; then
:
fi
if [ $buildjava == 1 ] ; then
buildbiomart=1
fi
if [ $buildbiomart == 1 ] ; then
buildsearch=1
buildxnatimport=1
fi
if [ $buildsearch == 1 ] ; then
buildcustom=1
buildgwas=1
buildauth=1
buildfolder=1
buildxnatviewer=1
fi
if [ $buildrestapi == 1 ] ; then
:
fi
if [ $buildcustom == 1 ] ; then
buildauth=1
fi
if [ $buildfolder == 1 ] ; then
buildgwas=1
fi
if [ $buildmetacore == 1 ] ; then
buildrmodules=1
fi
if [ $buildrmodules == 1 ] ; then
buildgalaxy=1
buildgwas=1
buildplink=1
fi
if [ $buildauth == 1 ] ; then
:
fi
if [ $buildipa == 1 ] ; then
buildsmartr=1
fi
if [ $buildsmartr == 1 ] ; then
:
fi
if [ $buildgalaxy == 1 ] ; then
:
fi
if [ $buildxnatimport == 1 ] ; then
:
fi
if [ $buildxnatviewer == 1 ] ; then
:
fi
if [ $buildgwas == 1 ] ; then
:
fi
if [ $buildplink == 1 ] ; then
:
fi
# Check dependencies for WAR file
# ===============================
if [ $buildrestapi == 1 ] ; then
buildwar=1
fi
if [ $buildgwas == 1 ] ; then
buildwar=1
fi
if [ $buildplink == 1 ] ; then
buildwar=1
fi
if [ $buildmetacore == 1 ] ; then
buildwar=1
fi
if [ $buildgalaxy == 1 ] ; then
buildwar=1
fi
if [ $buildcoretests == 1 ] ; then
buildwar=1
fi
if [ $buildcore == 1 ] ; then
buildwar=1
fi
if [ $buildapi == 1 ] ; then
buildwar=1
fi
if [ $builddalliance == 1 ] ; then
buildwar=1
fi
if [ $buildmydas == 1 ] ; then
buildwar=1
fi
if [ $buildipa == 1 ] ; then
buildsmartr=1
fi
if [ $buildsmartr == 1 ] ; then
buildwar=1
fi
if [ $buildfractalis == 1 ] ; then
buildwar=1
fi
if [ $buildxnatviewer == 1 ] ; then
buildwar=1
fi
if [ $buildxnatimport == 1 ] ; then
buildwar=1
fi
if [ $buildcustom == 1 ] ; then
buildwar=1
fi
if [ $buildshared == 1 ] ; then
buildwar=1
fi
if [ $buildauth == 1 ] ; then
buildwar=1
fi
# GWAVA dependencies
if [ "$build" == "gwava" ] || [ "$buildb" == "gwava" ] ; then
buildgwava=1
fi
# Report builds required
# ======================
if [ $buildapi != 0 ] ; then
echo "api: $buildapi"
fi
if [ $buildshared != 0 ] ; then
echo "shared: $buildshared"
fi
if [ $buildlegacy != 0 ] ; then
echo "legacy: $buildlegacy"
fi
if [ $buildfractalis != 0 ] ; then
echo "fractalis: $buildfractalis"
fi
if [ $builddas != 0 ] ; then
echo "das: $builddas"
fi
if [ $builddalliance != 0 ] ; then
echo "dalliance: $builddalliance"
fi
if [ $buildcore != 0 ] ; then
echo "core: $buildcore"
fi
if [ $buildcoretests != 0 ] ; then
echo "coretests: $buildcoretests"
fi
if [ $buildmydas != 0 ] ; then
echo "mydas: $buildmydas"
fi
if [ $buildjava != 0 ] ; then
echo "java: $buildjava"
fi
if [ $buildbiomart != 0 ] ; then
echo "biomart: $buildbiomart"
fi
if [ $buildsearch != 0 ] ; then
echo "search: $buildsearch"
fi
if [ $buildrestapi != 0 ] ; then
echo "restapi: $buildrestapi"
fi
if [ $buildcustom != 0 ] ; then
echo "custom: $buildcustom"
fi
if [ $buildfolder != 0 ] ; then
echo "folder: $buildfolder"
fi
if [ $buildrmodules != 0 ] ; then
echo "rmodules: $buildrmodules"
fi
if [ $buildauth != 0 ] ; then
echo "auth: $buildauth"
fi
if [ $buildipa != 0 ] ; then
echo "ipa: $buildipa"
fi
if [ $buildsmartr != 0 ] ; then
echo "smartr: $buildsmartr"
fi
if [ $buildgalaxy != 0 ] ; then
echo "galaxy: $buildgalaxy"
fi
if [ $buildmetacore != 0 ] ; then
echo "metacore: $buildmetacore"
fi
if [ $buildxnatimport != 0 ] ; then
echo "xnatimport: $buildxnatimport"
fi
if [ $buildxnatviewer != 0 ] ; then
echo "xnatviewer: $buildxnatviewer"
fi
if [ $buildgwas != 0 ] ; then
echo "gwas: $buildgwas"
fi
if [ $buildplink != 0 ] ; then
echo "plink: $buildplink"
fi
if [ $buildgnome != 0 ] ; then
echo "gnome: $buildgnome"
fi
if [ $buildi2b2core != 0 ] ; then
echo "i2b2core: $buildi2b2core"
fi
if [ $buildi2b2 != 0 ] ; then
echo "i2b2: $buildi2b2"
fi
if [ $buildworkspace != 0 ] ; then
echo "workspace: $buildworkspace"
fi
if [ $buildwar != 0 ] ; then
echo "war: $buildwar"
fi
if [ $buildgwava != 0 ] ; then
echo "gwava: $buildgwava"
fi
if [ $clean != 0 ] ; then
echo "CLEAN: YES"
fi
if [ $cleangrails != 0 ] ; then
echo "CLEANGRAILS:YES"
fi
if [ $buildwar == 0 ] && [ $buildgwava == 0 ] ; then
echo "Invalid argument $1"
exit
fi
# 01-core-api
if [ $buildapi == 1 ] ; then
DIR="transmart-core-api"
PNAME="transmart-core-api"
echo "01-$DIR"
echo ""
cd $DIR
if [ $clean == 1 ] ; then
# no grails plugin files, only maven install
rm -rf ~/.m2/repository/org/transmartproject/$PNAME
fi
./gradlew clean build publishToMavenLocal > $OUT/$PREFIX-$DIR.out 2>&1
egrep -i 'Could not|error[^-]|warning|failure|fail!' $OUT/$PREFIX-$DIR.out
cd ..
if [ $sleeptime != 0 ]; then
sleep $sleeptime
fi
fi
# 02-transmart-shared
if [ $buildshared == 1 ] ; then
DIR="transmart-shared"
PNAME="transmart-shared"
echo "02-$DIR"
echo ""
cd $DIR
if [ $clean == 1 ] ; then
rm -rf ~/.grails/2.*/projects/$PNAME
rm -rf ~/.grails/2.*/projects/*/plugins/$PNAME-1*-SNAPSHOT
rm -rf ~/.grails/2.*/projects/*/resources/plugins/$PNAME-1*-SNAPSHOT
rm -rf ~/.m2/repository/org/grails/plugins/$PNAME
fi
if [ $cleangrails == 1 ] ; then
./grailsw clean-all
fi
./grailsw package-plugin > $OUT/$PREFIX-$DIR.out 2>&1
./grailsw maven-install >> $OUT/$PREFIX-$DIR.out 2>&1
egrep -i 'error[^-]|warning|fail' $OUT/$PREFIX-$DIR.out
cd ..
fi
# 03-legacy-db
if [ $buildlegacy == 1 ] ; then
DIR="transmart-legacy-db"
PNAME="transmart-legacy-db"
echo "03-$DIR"
echo ""
cd $DIR
if [ $clean == 1 ] ; then
rm -rf ~/.grails/2.*/projects/$PNAME
rm -rf ~/.grails/2.*/projects/*/plugins/$PNAME*SNAPSHOT
rm -rf ~/.grails/2.*/projects/*/resources/plugins/$PNAME*SNAPSHOT
rm -rf ~/.m2/repository/org/grails/plugins/$PNAME
fi
if [ $cleangrails == 1 ] ; then
./grailsw clean-all
fi
./grailsw package-plugin > $OUT/$PREFIX-$DIR.out 2>&1
./grailsw maven-install >> $OUT/$PREFIX-$DIR.out 2>&1
egrep -i 'error[^-]|warning|fail' $OUT/$PREFIX-$DIR.out
cd ..
if [ $sleeptime != 0 ]; then
sleep $sleeptime
fi
fi
# 05-Fractalis
if [ $buildfractalis == 1 ] ; then
DIR="transmart-fractalis"
PNAME="transmart-fractalis"
echo "05-$DIR"
echo ""
cd $DIR
if [ $clean == 1 ] ; then
rm -rf ~/.grails/2.*/projects/$PNAME
rm -rf ~/.m2/repository/org/grails/plugins/$PNAME
rm -rf ~/.grails/2.*/projects/*/plugins/$PNAME*SNAPSHOT
rm -rf ~/.grails/2.*/projects/*/resources/plugins/$PNAME*SNAPSHOT
rm -rf ~/.m2/repository/org/grails/plugins/$PNAME
fi
if [ $cleangrails == 1 ] ; then
./grailsw clean-all
fi
./grailsw package-plugin > $OUT/$PREFIX-$DIR.out 2>&1
./grailsw maven-install >> $OUT/$PREFIX-$DIR.out 2>&1
egrep -i 'error[^-]|warning|fail' $OUT/$PREFIX-$DIR.out
cd ..
if [ $sleeptime != 0 ]; then
sleep $sleeptime
fi
fi
# 08-mydas
if [ $builddas == 1 ] ; then
DIR="mydas"
PNAME="mydas"
echo "08-$DIR"
echo ""
cd $DIR
if [ $clean == 1 ] ; then
# No grails, only the maven install
rm -rf ~/.m2/repository/uk/ac/ebi/$PNAME
fi
cd mydas
# ./gradlew clean build publishToMavenLocal > $OUT/$PREFIX-$DIR.out 2>&1
mvn install > $OUT/$PREFIX-$DIR.out 2>&1
cd ..
egrep -i 'error[^-]|warning|fail' $OUT/$PREFIX-$DIR.out
cd ..
if [ $sleeptime != 0 ]; then
sleep $sleeptime
fi
fi
# 09-dalliance
if [ $builddalliance == 1 ] ; then
DIR="dalliance-plugin"
PNAME="dalliance-plugin"
echo "09-$DIR"
echo ""
cd $DIR
if [ $clean == 1 ] ; then
rm -rf ~/.grails/2.*/projects/$PNAME
rm -rf ~/.grails/2.*/projects/*/plugins/$PNAME*SNAPSHOT
rm -rf ~/.grails/2.*/projects/*/resources/plugins/$PNAME*SNAPSHOT
rm -rf ~/.m2/repository/org/grails/plugins/$PNAME
fi
if [ $cleangrails == 1 ] ; then
./grailsw clean-all
fi
./grailsw package-plugin > $OUT/$PREFIX-$DIR.out 2>&1
./grailsw maven-install >> $OUT/$PREFIX-$DIR.out 2>&1
#
#egrep -i 'error[^-]|warning|fail' $OUT/$PREFIX-$DIR.out
cd ..
if [ $sleeptime != 0 ]; then
sleep $sleeptime
fi
fi
# 11-transmart-core-db
if [ $buildcore == 1 ] ; then
DIR="transmart-core-db"
PNAME="transmart-core"
echo "11-$DIR"
echo ""
cd $DIR
# first we build
if [ $clean == 1 ] ; then
rm -rf ~/.grails/2.*/projects/$PNAME
rm -rf ~/.grails/2.*/projects/*/plugins/$PNAME-1*-SNAPSHOT
rm -rf ~/.grails/2.*/projects/*/resources/plugins/$PNAME-1*-SNAPSHOT
rm -rf ~/.m2/repository/org/grails/plugins/$PNAME
fi
if [ $cleangrails == 1 ] ; then
./grailsw clean-all
fi
# First pass may give errors but resolves dependencies
# Output file overwritten on second pass
./grailsw package-plugin > $OUT/$PREFIX-$DIR.out 2>&1
./grailsw package-plugin > $OUT/$PREFIX-$DIR.out 2>&1
./grailsw maven-install >> $OUT/$PREFIX-$DIR.out 2>&1
egrep -i 'error[^-]|warning|fail' $OUT/$PREFIX-$DIR.out
cd ..
# then we use the build to test
fi
# 12-transmart-core-db-tests
if [ $buildcoretests == 1 ] ; then
DIR="transmart-core-db-tests"
PNAME="transmart-core-db-tests"
echo "12-$DIR"
echo ""
cd $DIR
if [ $clean == 1 ] ; then
rm -rf ~/.grails/2.*/projects/$PNAME
rm -rf ~/.grails/2.*/projects/*/plugins/$PNAME*SNAPSHOT
rm -rf ~/.grails/2.*/projects/*/resources/plugins/$PNAME*SNAPSHOT
rm -rf ~/.m2/repository/org/grails/plugins/$PNAME
fi
if [ $cleangrails == 1 ] ; then
./grailsw clean-all
fi
rm -rf target/stacktrace.log
# This step gives errors but prepares a rerun
# The output file will be overwritten
./grailsw test-app --xml > $OUT/$PREFIX-$DIR.out 2>&1
./grailsw maven-install >> $OUT/$PREFIX-$DIR.out 2>&1
# We have to expect errors etc. from tests that check failure conditions!
egrep -i 'error[^-]|warning|fail' $OUT/$PREFIX-$DIR.out
./test-results-parse.pl $OUT/$PREFIX-$DIR.out
cd ..
if [ $sleeptime != 0 ]; then
sleep $sleeptime
fi
fi
# 13-transmart-mydas
if [ $buildmydas == 1 ] ; then
DIR="transmart-mydas"
PNAME="transmart-mydas"
echo "13-$DIR"
echo ""
cd $DIR
if [ $clean == 1 ] ; then
rm -rf ~/.grails/2.*/projects/$PNAME
rm -rf ~/.grails/2.*/projects/*/plugins/$PNAME*SNAPSHOT
rm -rf ~/.grails/2.*/projects/*/resources/plugins/$PNAME*SNAPSHOT
rm -rf ~/.m2/repository/org/grails/plugins/$PNAME
fi
if [ $cleangrails == 1 ] ; then
./grailsw clean-all
fi
./grailsw package-plugin > $OUT/$PREFIX-$DIR.out 2>&1
./grailsw maven-install >> $OUT/$PREFIX-$DIR.out 2>&1
egrep -i 'error[^-]|warning|fail' $OUT/$PREFIX-$DIR.out
cd ..
if [ $sleeptime != 0 ]; then
sleep $sleeptime
fi
fi
# 21-transmart-java
if [ $buildjava == 1 ] ; then
DIR="transmart-java"
PNAME="transmart-java"
echo "21-$DIR"
echo ""
cd $DIR
if [ $clean == 1 ] ; then
rm -rf ~/.grails/2.*/projects/$PNAME
rm -rf ~/.grails/2.*/projects/*/plugins/$PNAME*SNAPSHOT
rm -rf ~/.grails/2.*/projects/*/resources/plugins/$PNAME*SNAPSHOT
rm -rf ~/.m2/repository/org/grails/plugins/$PNAME
fi
if [ $cleangrails == 1 ] ; then
./grailsw clean-all
fi
./grailsw package-plugin > $OUT/$PREFIX-$DIR.out 2>&1
./grailsw maven-install >> $OUT/$PREFIX-$DIR.out 2>&1
egrep -i 'error[^-]|warning|fail' $OUT/$PREFIX-$DIR.out
cd ..
if [ $sleeptime != 0 ]; then
sleep $sleeptime
fi
fi
# 22-biomart-domain
if [ $buildbiomart == 1 ] ; then
DIR="biomart-domain"
PNAME="biomart-domain"
echo "22-$DIR"
echo ""
cd $DIR
if [ $clean == 1 ] ; then
rm -rf ~/.grails/2.*/projects/$PNAME
rm -rf ~/.grails/2.*/projects/*/plugins/$PNAME*SNAPSHOT
rm -rf ~/.grails/2.*/projects/*/resources/plugins/$PNAME*SNAPSHOT
rm -rf ~/.m2/repository/org/grails/plugins/$PNAME
fi
if [ $cleangrails == 1 ] ; then
./grailsw clean-all
fi
./grailsw package-plugin > $OUT/$PREFIX-$DIR.out 2>&1
./grailsw maven-install >> $OUT/$PREFIX-$DIR.out 2>&1
egrep -i 'error[^-]|warning|fail' $OUT/$PREFIX-$DIR.out
cd ..
if [ $sleeptime != 0 ]; then
sleep $sleeptime