-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuildcallbacks.xml
167 lines (137 loc) · 5.39 KB
/
buildcallbacks.xml
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
[y] hybris Platform
Copyright (c) 2000-2015 hybris AG
All rights reserved.
This software is the confidential and proprietary information of hybris
("Confidential Information"). You shall not disclose such Confidential
Information and shall use it only in accordance with the terms of the
license agreement you entered into with hybris.
-->
<!--
All hybris buildcallbacks.xml macrodefinitions:
Build/Documentation
before/after ant macro "clean"
<macrodef name="atom_before_clean"/>
<macrodef name="atom_after_clean"/>
before/after ant macro "build"
<macrodef name="atom_before_build"/>
<macrodef name="atom_after_build"/>
before/after ant macro "compile_core" - the core module of the extension
<macrodef name="atom_before_compile_core">
<macrodef name="atom_after_compile_core">
before/after ant macro "compile_web" - the web module of the extension
<macrodef name="atom_before_compile_web" />
<macrodef name="atom_after_compile_web" />
before/after ant macro "compile_hmc" - the hmc module of the extension
<macrodef name="atom_before_compile_hmc" />
<macrodef name="atom_after_compile_hmc" />
Preparing extension
will be called in the beginning of the ant call and only once (also when using multiple
ant targets e.g. ant build yunittest)
<macrodef name="atom_only_once_prepare"/>
Creating ear module/production
before/after ant macro "ear"
<macrodef name="atom_before_ear"/>
<macrodef name="atom_after_ear"/>
before/after ant macro "production" - for hybris server only
<macrodef name="atom_before_production" />
<macrodef name="atom_after_production" />
JUnit Test
before/after ant macro "yunitinit"
<macrodef name="atom_before_yunitinit" />
<macrodef name="atom_after_yunitinit" />
before/after ant macro "yunit"
<macrodef name="atom_before_yunit" />
<macrodef name="atom_after_yunit" />
Distribution package
before/after ant macro "dist" - internal target; only for use when platform is available in source code
<macrodef name="atom_after_dist"/>
<macrodef name="atom_before_dist"/>
before/after ant macro "dist_copy" - internal target; only for use when platform is available in source code
<macrodef name="atom_before_dist_copy"/>
<macrodef name="atom_after_dist_copy"/>
-->
<project name="atom_buildcallbacks">
<property name="storefront.path" value="${ext.adamstorefront.path}">
</property>
<macrodef name="generateAddonPath">
<sequential>
<var name="addPath" value="">
</var>
<for list="b2ccheckoutaddon" param="letter">
<sequential>
<var name="addPath" value="${addPath},@{letter}:${ext.@{letter}.path}">
</var>
</sequential>
</for>
<property name="addonPath" value="${addPath}">
</property>
</sequential>
</macrodef>
<macrodef name="generateconfig">
<sequential>
<uptodate property="updates" targetfile="${ext.atom.path}/project.properties" value="true">
<srcfiles file="${ext.atom.path}/acceleratoraddon/web/webroot/_ui/share/config.properties"/>
</uptodate>
<if>
<equals arg1="${updates}" arg2="true"/>
<then>
<concat destfile="${ext.atom.path}/acceleratoraddon/web/webroot/_ui/share/config.properties" overwrite="yes">
<filelist dir="${ext.atom.path}" files="project.properties"/>
</concat>
<replaceregexp byline="true">
<regexp pattern="^((?!atom.config.).)*"/>
<substitution expression=""/>
<fileset dir="${ext.atom.path}/acceleratoraddon/web/webroot/_ui/share/" includes="**/*.properties"/>
</replaceregexp>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="atom_before_build">
<sequential>
<echo message="start front end file generation">
</echo>
<generateAddonPath/>
<generateconfig/>
<!-- temp solution-->
<copy todir="${storefront.path}/web/webroot/_ui/addons/atom/share">
<fileset dir="${ext.atom.path}/acceleratoraddon/web/webroot/_ui/share">
<include name="*.js" />
<include name="*.json" />
<include name="./node_modules/*.js" />
<include name="*.properties" />
</fileset>
</copy>
<available file="${storefront.path}/web/webroot/_ui/addons/atom/share/node_modules" type="dir" property="nodeModule.exist" />
<if>
<equals arg1="${nodeModule.exist}" arg2="true"/>
<else>
<mkdir dir="${storefront.path}/web/webroot/_ui/addons/atom/share/node_modules"/>
</else>
</if>
<available file="${storefront.path}/web/webroot/_ui/addons/atom/share/node_modules/gulp-util" property="gulpModule.exist" />
<echo message="go to gulp copy"></echo>
<if>
<equals arg1="${gulpModule.exist}" arg2="true"/>
<else>
<copy todir="${storefront.path}/web/webroot/_ui/addons/atom/share/node_modules">
<fileset dir="${ext.atom.path}/acceleratoraddon/web/webroot/_ui/share/node_modules">
<include name="**/*.*" />
</fileset>
</copy>
</else>
</if>
</sequential>
</macrodef>
<macrodef name="atom_after_build">
<sequential>
<echo message="start gulp">
</echo>
<exec executable="gulp" failonerror="true">
<arg line="default --gulpfile ${storefront.path}/web/webroot/_ui/addons/atom/share/gulpfile.js --cwd ${storefront.path}/web/webroot --devEnable ${development.mode} --addonPath ${addonPath} --userExperience ${commerceservices.default.desktop.ui.experience}"/>
</exec>
</sequential>
</macrodef>
</project>