mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-11-28 10:30:42 +00:00
add update task
This commit is contained in:
parent
8e95df660b
commit
8c55c64b40
3
Makefile
3
Makefile
|
|
@ -39,6 +39,9 @@ quickstart-dev:
|
||||||
install:
|
install:
|
||||||
php vendor/bin/phing -Dversion=$(VERSION) -Dinstallpath=$(INSTALL_PATH) -Ddomain=dms.seeddms.org install
|
php vendor/bin/phing -Dversion=$(VERSION) -Dinstallpath=$(INSTALL_PATH) -Ddomain=dms.seeddms.org install
|
||||||
|
|
||||||
|
update:
|
||||||
|
php vendor/bin/phing -Dversion=$(VERSION) -Dinstallpath=$(INSTALL_PATH) -Ddomain=dms.seeddms.org update
|
||||||
|
|
||||||
unittest:
|
unittest:
|
||||||
vendor/bin/phing -Dversion=$(VERSION) phpunitfast
|
vendor/bin/phing -Dversion=$(VERSION) phpunitfast
|
||||||
|
|
||||||
|
|
|
||||||
39
build.xml
39
build.xml
|
|
@ -301,10 +301,17 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="install" description="Install SeedDMS">
|
<target name="install" description="Install SeedDMS">
|
||||||
<phingcall target="package">
|
<if>
|
||||||
</phingcall>
|
<equals arg1="" arg2="${installpath}" />
|
||||||
<exec executable="tar" passthru="true" checkreturn="true" dir="${installpath}">
|
<then><fail msg="Pass install path as property 'installpath'. Ensure this directory exists and is writeable by the user running this build script." /></then>
|
||||||
<arg line="-xzvf ${builddir}/packages/seeddms-quickstart-${version}.tar.gz ${shortversion} --strip-components=1" />
|
</if>
|
||||||
|
<if>
|
||||||
|
<not><available file="${installpath}"/></not>
|
||||||
|
<then><fail msg="Install path '${installpath}' does not exist." /></then>
|
||||||
|
</if>
|
||||||
|
<phingcall target="package"></phingcall>
|
||||||
|
<exec executable="tar" passthru="false" checkreturn="true" dir="${installpath}">
|
||||||
|
<arg line="-xzvf ${builddir}/packages/seeddms-quickstart-${version}.tar.gz --strip-components=1" />
|
||||||
</exec>
|
</exec>
|
||||||
<copy file="${srcdir}/conf/apache.virtualhost.template" tofile="${installpath}/conf/apache.virtualhost.conf">
|
<copy file="${srcdir}/conf/apache.virtualhost.template" tofile="${installpath}/conf/apache.virtualhost.conf">
|
||||||
<filterchain>
|
<filterchain>
|
||||||
|
|
@ -314,11 +321,33 @@
|
||||||
</replaceregexp>
|
</replaceregexp>
|
||||||
</filterchain>
|
</filterchain>
|
||||||
</copy>
|
</copy>
|
||||||
|
<exec executable="bash" passthru="true" dir="${installpath}">
|
||||||
|
<arg value="-c"/>
|
||||||
|
<arg line="'sudo chown www-data:www-data ${installpath}'" />
|
||||||
|
</exec>
|
||||||
<exec executable="bash" passthru="true" dir="${installpath}">
|
<exec executable="bash" passthru="true" dir="${installpath}">
|
||||||
<arg value="-c"/>
|
<arg value="-c"/>
|
||||||
<arg line="'sudo chown -R www-data:www-data ${installpath}/data ${installpath}/conf'" />
|
<arg line="'sudo chown -R www-data:www-data ${installpath}/data ${installpath}/conf'" />
|
||||||
</exec>
|
</exec>
|
||||||
<echo message="Create a link in /etc/apache2/sites-enabled/" />
|
<echo message="Create a link in /etc/apache2/sites-enabled/" />
|
||||||
<echo message="sudo -u www-data ln -s ${installpath}/conf/apache.virtualhost.conf /etc/apache2/sites-enabled/001-seeddms.conf" />
|
<echo message="sudo ln -s ${installpath}/conf/apache.virtualhost.conf /etc/apache2/sites-enabled/001-seeddms.conf" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="update" description="Update SeedDMS Installation">
|
||||||
|
<if>
|
||||||
|
<equals arg1="" arg2="${installpath}" />
|
||||||
|
<then><fail msg="Pass install path as property 'installpath'. Ensure this directory exists and is writeable by the user running this build script." /></then>
|
||||||
|
</if>
|
||||||
|
<if>
|
||||||
|
<not><available file="${installpath}"/></not>
|
||||||
|
<then><fail msg="Install path '${installpath}' does not exist." /></then>
|
||||||
|
</if>
|
||||||
|
<phingcall target="package"></phingcall>
|
||||||
|
<exec executable="tar" passthru="false" checkreturn="true" dir="${installpath}">
|
||||||
|
<arg line="-xzvf ${builddir}/packages/seeddms-quickstart-${version}.tar.gz --strip-components=1 ${shortversion}/vendor ${shortversion}/seeddms-${version}" />
|
||||||
|
</exec>
|
||||||
|
<!-- delete file="${installpath}/seeddms" / -->
|
||||||
|
<!-- symlink target="${installpath}/${shortversion}" link="${installpath}/seeddms" relative="true"/ -->
|
||||||
|
<echo message="If you have updated to a newer version of SeedDMS, you will have to adjust the link 'seeddms' pointing to 'seeddms-${version}' in '${installpath}'." />
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user