Skip to content

Commit

Permalink
LPS-118309 Use appversion
Browse files Browse the repository at this point in the history
  • Loading branch information
petershin authored and brianchandotcom committed Aug 14, 2020
1 parent 00b6e77 commit fc02898
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1688,13 +1688,14 @@ artifact.url=${remote.repository.url}/com/liferay/portal/com.liferay.${processed

<macrodef name="setup-dxp-app">
<attribute name="appname" />
<attribute name="appversion" />

<sequential>
<gradle-execute outputproperty="dxp.app.zip.file" setupbinariescache="false" task="printDependencyPath">
<arg value="--build-file=${project.dir}/modules/util.gradle" />
<arg value="--quiet" />
<arg value="-Dorg.gradle.internal.launcher.welcomeMessageEnabled=false" />
<arg value="-PdependencyNotation=com.liferay.portal:com.liferay.portal.dxp.apps.@{appname}:latest.release" />
<arg value="-PdependencyNotation=com.liferay.portal:com.liferay.portal.dxp.apps.@{appname}:@{appversion}" />
</gradle-execute>

<propertyregex
Expand All @@ -1714,39 +1715,39 @@ artifact.url=${remote.repository.url}/com/liferay/portal/com.liferay.${processed
to="${project.dir}/modules/dxp/@{appname}"
type="merge"
/>
<srcfiles dir="${dxp.app.zip.dir}" includes="com.liferay.portal.dxp.apps.@{appname}-${build.setup.profile.dxp.app.lcs.version}.zip" />
<srcfiles dir="${dxp.app.zip.dir}" includes="com.liferay.portal.dxp.apps.@{appname}-@{appversion}.zip" />
</uptodate>
</not>
<then>
<delete dir="${project.dir}/modules/.releng/dxp/apps/@{appname}" />

<unzip
dest="${project.dir}/modules/.releng/dxp/apps"
src="${dxp.app.zip.dir}/com.liferay.portal.dxp.apps.@{appname}-${build.setup.profile.dxp.app.lcs.version}.zip"
src="${dxp.app.zip.dir}/com.liferay.portal.dxp.apps.@{appname}-@{appversion}.zip"
>
<mapper
from="com.liferay.portal.dxp.apps.@{appname}-${build.setup.profile.dxp.app.lcs.version}/.releng/*"
from="com.liferay.portal.dxp.apps.@{appname}-@{appversion}/.releng/*"
to="@{appname}/*"
type="glob"
/>
<patternset>
<include name="com.liferay.portal.dxp.apps.@{appname}-${build.setup.profile.dxp.app.lcs.version}/.releng/**" />
<include name="com.liferay.portal.dxp.apps.@{appname}-@{appversion}/.releng/**" />
</patternset>
</unzip>

<delete dir="${project.dir}/modules/dxp/apps/@{appname}" />

<unzip
dest="${project.dir}/modules/dxp/apps"
src="${dxp.app.zip.dir}/com.liferay.portal.dxp.apps.@{appname}-${build.setup.profile.dxp.app.lcs.version}.zip"
src="${dxp.app.zip.dir}/com.liferay.portal.dxp.apps.@{appname}-@{appversion}.zip"
>
<mapper
from="com.liferay.portal.dxp.apps.@{appname}-${build.setup.profile.dxp.app.lcs.version}/apps/*"
from="com.liferay.portal.dxp.apps.@{appname}-@{appversion}/apps/*"
to="@{appname}/*"
type="glob"
/>
<patternset>
<include name="com.liferay.portal.dxp.apps.@{appname}-${build.setup.profile.dxp.app.lcs.version}/apps/**" />
<include name="com.liferay.portal.dxp.apps.@{appname}-@{appversion}/apps/**" />
</patternset>
</unzip>
</then>
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ This target has been renamed to "snapshot-bundle". Please call "snapshot-bundle"
</not>
</and>
<then>
<setup-dxp-app appname="lcs" />
<setup-dxp-app appname="lcs" appversion="${build.setup.profile.dxp.app.lcs.version}" />
</then>
</if>

Expand Down

0 comments on commit fc02898

Please sign in to comment.