* improved deploy-website script

This commit is contained in:
Reinhard Pointner 2015-05-10 07:29:54 +00:00
parent d7539e2d4c
commit ffc7c89bf0
2 changed files with 41 additions and 30 deletions

View File

@ -750,13 +750,22 @@
<target name="deploy-website" depends="login"> <target name="deploy-website" depends="login">
<!-- prepare website resources --> <!-- prepare ant variables required for dynamically generated website content -->
<property name="dir.download" value="${dir.build}/package-source" />
<property name="spk.download" value="http://downloads.sourceforge.net/project/filebot/filebot/FileBot_${version}/filebot-${version}-noarch.spk" />
<mkdir dir="${dir.download}" />
<get src="${spk.download}" dest="${dir.download}" usetimestamp="true" />
<checksum file="${dir.download}/filebot-${version}-noarch.spk" algorithm="MD5" property="spk.md5" />
<length file="${dir.download}/filebot-${version}-noarch.spk" property="spk.size" />
<!-- copy static website resources -->
<copy todir="${dir.dist}/website"> <copy todir="${dir.dist}/website">
<fileset dir="${dir.website}"> <fileset dir="${dir.website}">
<include name="*.html" />
<include name="*.php" />
<include name="*.json" /> <include name="*.json" />
<include name="*.xml" /> <include name="*.xml" />
<include name="*.php" />
<include name="*.html" />
<include name="*.css" /> <include name="*.css" />
<include name="*.js" /> <include name="*.js" />
<include name="*.png" /> <include name="*.png" />
@ -770,17 +779,20 @@
</fileset> </fileset>
</copy> </copy>
<!-- get MD5 sum for Synology Package --> <!-- copy files and resolve ant variables -->
<checksum file="${dir.release}/filebot-${version}-noarch.spk" algorithm="MD5" property="spk.md5" /> <echo message="Replace Ant variables" />
<copy todir="${dir.dist}/website" overwrite="yes" encoding="UTF-8" verbose="true">
<!-- replace variables for new release --> <fileset dir="${dir.website}">
<replace dir="${dir.dist}/website" encoding="utf-8" summary="yes"> <include name="*.html" />
<include name="**/*.html" /> <include name="*.php" />
<include name="**/*.php" /> <include name="syno/*.json" />
<include name="**/*.json" /> </fileset>
<replacefilter token="@{version}" value="${version}" /> <filterset begintoken="@{" endtoken="}">
<replacefilter token="@{spk.md5}" value="${spk.md5}" /> <propertyset>
</replace> <propertyref builtin="all" />
</propertyset>
</filterset>
</copy>
<!-- upload --> <!-- upload -->
<scp todir="${sf.user}:${sf.password}@${frs.website}" trust="yes" verbose="true" sftp="true"> <scp todir="${sf.user}:${sf.password}@${frs.website}" trust="yes" verbose="true" sftp="true">

View File

@ -7,21 +7,20 @@
{ {
"dname": "FileBot", "dname": "FileBot",
"desc": "FileBot is the ultimate tool for organizing and renaming your movies, TV shows or anime, as well as downloading subtitles and artwork. It's smart and just works.", "desc": "FileBot is the ultimate tool for organizing and renaming your movies, TV shows or anime, as well as downloading subtitles and artwork. It's smart and just works.",
"maintainer": "rednoah",
"distributor":"FileBot", "distributor":"FileBot",
"distributor_url":"http://www.filebot.net/", "distributor_url":"http://www.filebot.net/",
"qinst": true, "maintainer":"rednoah",
"qupgrade": true, "maintainer_url":"http://www.filebot.net/",
"qstart": true,
"depsers": "ssh",
"icon": "http://packages.filebot.net/syno/spk.icon.png", "icon": "http://packages.filebot.net/syno/spk.icon.png",
"snapshot": [ "snapshot": [ "http://packages.filebot.net/syno/spk.snapshot.png" ],
"http://packages.filebot.net/syno/spk.snapshot.png"
],
"package": "filebot", "package": "filebot",
"version": "@{version}", "version": "@{version}",
"link": "https://downloads.sourceforge.net/project/filebot/filebot/FileBot_@{version}/filebot-@{version}-noarch.spk", "size": @{spk.size},
"size": "52428800", "md5": "@{spk.md5}",
"md5": "@{spk.md5}" "link": "@{spk.download}",
"depsers": "ssh",
"qinst":true,
"qstart":true,
"qupgrade":true
} }
] ]