forked from shopgate/interface-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_zip.xml
102 lines (82 loc) · 2.72 KB
/
create_zip.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Setup:
For Uploading to s3 you need s3cmd as commandline tool
For SVN you need svnant.jar in your java-library
Project: http://subclipse.tigris.org/svnant.html
Download: http://subclipse.tigris.org/files/documents/906/32898/svnant-1.0.0.zip
Version: 1.0.0
In Linux
- Copy the File lib/svnant.jar to /usr/share/java/
In Windows
- ...
-->
<project name="ZIP Library" basedir="." default="upload">
<description>Create the ZIP-File for ShopgateLibrary</description>
<property file="build.number"/>
<property file="build.properties"/>
<property name="project-root" location="./" />
<property name="ant-folder" location="./ant/" />
<property name="build-folder" location="${ant-folder}/build/" />
<property name="output-folder" location="${build-folder}/shopgate_library" />
<property name="release-folder" location="${ant-folder}/releases" />
<echo>
########################################################
## BUILD Library
########################################################
</echo>
<!--
Build the ZIP-File
-->
<target name="build">
<echo message="Build ZIP-Archive" />
<delete dir="${ant-folder}" />
<mkdir dir="${release-folder}" />
<mkdir dir="${output-folder}" />
<copy todir="${output-folder}">
<fileset dir="${project-root}" followsymlinks="false">
<include name="assets/" />
<include name="classes/" />
<include name="temp/" />
<include name="vendors/" />
<include name=".htaccess" />
<include name="shopgate.php" />
<include name="changelog.txt" />
<exclude name="temp/*.*"/>
</fileset>
</copy>
<mkdir dir="${output-folder}/config" />
<zip zipfile="${project-root}/${plugin.zip-filename}" basedir="${build-folder}" update="false" />
<delete dir="${ant-folder}" />
</target>
<!--
Upload the the new Version to S3
Depends on Prepare, create_tag, build
-->
<target name="upload" depends="build">
<s3cmd command="put" file="${project-root}/shopgate_library.zip" key="${plugin.s3-key}">
<args>
<arg value="--acl-public" />
</args>
</s3cmd>
<echo message="Public-URL: ${plugin.s3-key}" />
</target>
<!-- BEGIN MACROS -->
<macrodef name = "s3cmd">
<attribute name = "command" />
<attribute name = "file" default = "" />
<attribute name = "key" default = "" />
<element name = "args" optional = "true" />
<sequential>
<echo message = "Upload @{file} to @{key}" />
<exec executable = "${cmd.python}">
<arg value = "${cmd.s3cmd}" />
<arg value = "@{command}" />
<args />
<arg value = "@{file}" />
<arg value = "@{key}" />
</exec>
</sequential>
</macrodef>
<!-- END MACROS -->
</project>