Permalink
Browse files

Added scripts to package and deploy the legacy SageTV UIs so they can…

… be installed as a SageTV 9 plugin.
1 parent bd52418 commit ff419335852a58a01ca08f408c35b595b2209e69 @stuckless stuckless committed Jan 7, 2017
View
@@ -7,6 +7,7 @@
/ubuntuserver/
/ubuntuclient/
/clientrelease/
+/pluginrelease/
/sagetv*.deb
/sagetv*.gz
/SageJar*.zip
@@ -31,7 +31,8 @@ cp elf/jpegtran ./serverrelease/
cp ../install/config/RemoteClients.properties.defaults ./serverrelease
cp ../install/config/Sage.properties.defaults ./serverrelease
mkdir ./serverrelease/STVs
-cp -R ../stvs/SageTV3 ./serverrelease/STVs/
+# SageTV3 is now a plugin
+#cp -R ../stvs/SageTV3 ./serverrelease/STVs/
cp -R ../stvs/SageTV7 ./serverrelease/STVs/
rm ./serverrelease/STVs/SageTV7/*.stv
mkdir ./serverrelease/fonts
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SageTVPlugin>
+ <Name>SageTV 2 UI</Name>
+ <Identifier>SageTV2</Identifier>
+ <Description><![CDATA[
+ SageTV V2 UI
+ ]]></Description>
+ <Screenshot></Screenshot>
+ <Author>sagetv</Author>
+ <CreationDate>2016.01.07</CreationDate>
+ <ModificationDate>@@last-modified@@</ModificationDate>
+ <Version>@@stv-version@@</Version>
+ <Webpage><![CDATA[https://forums.sagetv.com/]]></Webpage>
+
+ <PluginType>STV</PluginType>
+
+ <Package>
+ <PackageType>STV</PackageType>
+ <Location><![CDATA[http://dl.bintray.com/opensagetv/sagetv/sagetv-themes/@@stv-version@@/@@stv-name@@-@@stv-version@@.zip]]></Location>
+ <MD5>@@stv-checksum@@</MD5>
+ </Package>
+
+ <ReleaseNotes><![CDATA[
+ ]]></ReleaseNotes>
+</SageTVPlugin>
@@ -0,0 +1,17 @@
+# Build Scripts for Legacy SageTV UIs
+
+The `build.xml` script will package any `stv` defined in the `stvs` folder and create a valid SageTV 9 STV package for it.
+
+```
+# ant -Dstv.name=SageTV3
+```
+
+Will create the `SageTV3-9.0.zip` theme package and xml in the `pluginrelease` folder.
+
+To upload the theme package to `BinTray` you can use the `plugin-uploader.gradle` script in the root of the project.
+
+```
+# ./gradlew -b plugin-uploader.gradle -Dstv.name=SageTV3 bintrayUpload
+```
+
+These legacy SageTV UIs are not expected to change, so they are not a part of the standard build/deployment process.
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SageTVPlugin>
+ <Name>SageTV 3 UI</Name>
+ <Identifier>SageTV3</Identifier>
+ <Description><![CDATA[
+ SageTV V3 UI
+ ]]></Description>
+ <Screenshot></Screenshot>
+ <Author>sagetv</Author>
+ <CreationDate>2016.01.07</CreationDate>
+ <ModificationDate>@@last-modified@@</ModificationDate>
+ <Version>@@stv-version@@</Version>
+ <Webpage><![CDATA[https://forums.sagetv.com/]]></Webpage>
+
+ <PluginType>STV</PluginType>
+
+ <Package>
+ <PackageType>STV</PackageType>
+ <Location><![CDATA[http://dl.bintray.com/opensagetv/sagetv/sagetv-themes/@@stv-version@@/@@stv-name@@-@@stv-version@@.zip]]></Location>
+ <MD5>@@stv-checksum@@</MD5>
+ </Package>
+
+ <ReleaseNotes><![CDATA[
+ ]]></ReleaseNotes>
+</SageTVPlugin>
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project basedir="." default="dist-plugins" name="SageTV3">
+ <tstamp/>
+
+ <property name="dist.dir" value="${basedir}/../pluginrelease/" />
+
+ <!--<property name="stv.name" value="SageTV3" />-->
+ <fail unless="stv.name" message="nedd to pass -Dstv.name=SageTV2|SageTV3"></fail>
+
+ <property name="stv.version" value="9.0" />
+ <property name="stv.dir" value="${basedir}/../../stvs/${stv.name}" />
+
+ <target name="init" depends="clean">
+ <mkdir dir="${dist.dir}" />
+ </target>
+
+ <target name="clean">
+ <delete dir="${dist.dir}" includes="${stv.name}*"/>
+ </target>
+
+ <target name="realclean">
+ <delete dir="${dist.dir}"/>
+ </target>
+
+ <target name="dist-plugins" description="Create the STV Plugin" depends="init">
+ <!-- zip stv -->
+ <zip destfile="${dist.dir}/${stv.name}-${stv.version}.zip">
+ <zipfileset dir="${stv.dir}" prefix="${stv.name}/" excludes="**/${stv.name}Patch*"></zipfileset>
+ </zip>
+ <checksum file="${dist.dir}/${stv.name}-${stv.version}.zip" property="md5.stv" />
+
+ <tstamp>
+ <format property="last-modified" pattern="yyyy.MM.dd" />
+ </tstamp>
+
+ <copy tofile="${dist.dir}/${stv.name}-${stv.version}.xml" file="${stv.name}.plugin.xml"/>
+ <replace file="${dist.dir}/${stv.name}-${stv.version}.xml" summary="yes">
+ <replacefilter token="@@last-modified@@" value="${last-modified}" />
+ <replacefilter token="@@stv-version@@" value="${stv.version}" />
+ <replacefilter token="@@stv-checksum@@" value="${md5.stv}" />
+ <replacefilter token="@@stv-name@@" value="${stv.name}" />
+ </replace>
+ </target>
+</project>
@@ -0,0 +1,73 @@
+/**
+ * NOTE: To use this uploader you should use the command
+ * ./gradlew -b plugin-uploader.gradle -Dstv.name=STVNAME bintrayUpload
+ *
+ * Before doing an upload, make sure you actually build the STV package
+ * cd build/pluginfiles/
+ * ant -Dstv.name=STVNAME
+ *
+ */
+plugins {
+ id "com.jfrog.bintray" version "1.7.3"
+}
+
+// Note this the version the Plugins, not sagetv
+version = '9.0'
+
+// Globals
+ext {
+ stv_name = System.getProperty("stv.name")
+ stv_version = version;
+}
+
+if (stv_name == null) {
+ throw new Exception("must pass -Dstv.name on the command line")
+}
+
+if (!file("build/pluginrelease/${stv_name}-${stv_version}.zip").exists()) {
+ throw new Exception("must run the build.xml in build/pluginfiles/ before uploading")
+}
+
+repositories {
+ mavenCentral()
+ jcenter()
+}
+
+// Upload tasks
+// use ./gradlew bintrayUpload
+// make sure your BINTRAY_API is set in the environment
+//
+bintray {
+ user = System.getenv("BINTRAY_USER")
+ key = System.getenv("BINTRAY_API");
+ filesSpec {
+ // from 'build/release'
+ from ('build/pluginrelease') {
+ include "${stv_name}*"
+ }
+ into "sagetv-themes/${stv_version}"
+ }
+ dryRun = false //Whether to run this as dry-run, without deploying
+ publish = true //If version should be auto published after an upload
+ pkg {
+ repo = 'sagetv'
+ name = "sagev-themes"
+ userOrg = 'opensagetv'
+ desc = "SageTV Theme Release"
+ licenses = ['Apache-2.0']
+ vcsUrl = 'https://github.com/google/sagetv'
+ labels = ['sagetv','theme']
+ publicDownloadNumbers = true
+ version {
+ name = "${stv_version}"
+ released = new Date()
+ desc = "SageTV Themes ${stv_version}"
+ //vcsTag = "V${version}"
+ //attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
+ }
+ }
+}
+
+// This get run when you call ./gradlew without any targets
+// defaultTasks 'sageJar'
+

0 comments on commit ff41933

Please sign in to comment.