forked from oxygenxml/userguide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-deploy-webhelp.xml
128 lines (109 loc) · 10 KB
/
build-deploy-webhelp.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
<project name="deploy-private" default="private">
<target name="private">
<property name="userguide.server">userguide.sync.ro</property>
<property name="userguide.server.dir">/var/www/userguide</property>
<property name="output.dir">webhelp-responsive-private</property>
<echo>Username: ${userguide.server.user}</echo>
<echo>Password: ${userguide.server.password}</echo>
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}" failonerror="false"
command="find ${userguide.server.dir} -maxdepth 1 -mindepth 1 -type d -exec rm -rf '{}' \;" />
<scp remoteTodir="${userguide.server.user}:${userguide.server.password}@${userguide.server}:${userguide.server.dir}/" trust="yes">
<fileset dir="${project.build.directory}/output/${output.dir}" />
</scp>
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}" failonerror="false"
command="mv ${userguide.server.dir}/feedback{,-cloud}" />
</target>
<target name="public">
<!-- Check for similarities with the private one. -->
<property name="userguide.server">software-archive.sync.ro</property>
<property name="userguide.server.user" value="" />
<property name="userguide.server.password" value="" />
<property name="userguide.server.dir">/repository/userguides</property>
<property name="output.dir">webhelp-responsive-public</property>
<property name="major.version" value=""/>
<property name="minor.version" value=""/>
<property name="micro.version" value=""/>
<condition property="userguide.server.credentials"
value="${userguide.server.user}:${userguide.server.password}"
else="${userguide.server.user}">
<isset property="${userguide.server.password}"/>
</condition>
<echo>Username: ${userguide.server.user}</echo>
<echo>Password: ${userguide.server.password}</echo>
<!-- Remove old version of userguides -->
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="rm -rf ${userguide.server.dir}/InstData${major.version}.${minor.version}.old" />
<!-- Web Author, We bAuthor Customization -->
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="rm -rf ${userguide.server.dir}/InstData${major.version}.${minor.version}.${micro.version}.old" />
<!-- Make a backup copy of latest userguides -->
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version} ${userguide.server.dir}/InstData${major.version}.${minor.version}.old" />
<!-- Web Author, We bAuthor Customization -->
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}.${micro.version} ${userguide.server.dir}/InstData${major.version}.${minor.version}.${micro.version}.old" />
<!-- Create directories -->
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mkdir -p ${userguide.server.dir}/InstData${major.version}.${minor.version}" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mkdir -p ${userguide.server.dir}/InstData${major.version}.${minor.version}.${micro.version}" />
<!-- Copy all userguides to InstData${major.version}.${minor.version} directory -->
<scp remoteTodir="${userguide.server.user}@${userguide.server}:${userguide.server.dir}/InstData${major.version}.${minor.version}/"
trust="yes" keyfile="${user.home}/.ssh/id_rsa">
<fileset dir="${project.build.directory}/output/${output.dir}" />
</scp>
<!-- Rename directories -->
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/author-sa ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-author" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/author-eclipse ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-authorEclipse" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/developer-sa ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-developer" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/developer-eclipse ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-developerEclipse" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/editor-sa ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-editor" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/editor-eclipse ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-editorEclipse" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/chemistry ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-chemistry" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/content-fusion ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-content-fusion" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/pdf-css ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-pdf-css" />
<!-- <sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/webhelp-classic ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-webhelp-classic" />-->
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/webhelp-responsive ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-webhelp-responsive" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/feedback ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-feedback" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/ope ${userguide.server.dir}/InstData${major.version}.${minor.version}/ug-ope" />
<!-- Move Web Author, Web Author Customization userguides to ${major.version}.${minor.version}.${micro.version} directory -->
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/webauthor ${userguide.server.dir}/InstData${major.version}.${minor.version}.${micro.version}/ug-webauthor" />
<sshexec host="${userguide.server}" username="${userguide.server.user}" trust="yes" password="${userguide.server.password}"
failonerror="false" keyfile="${user.home}/.ssh/id_rsa"
command="mv ${userguide.server.dir}/InstData${major.version}.${minor.version}/webauthor-customization ${userguide.server.dir}/InstData${major.version}.${minor.version}.${micro.version}/ug-waCustom" />
</target>
</project>