Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/google/sagetv
Browse files Browse the repository at this point in the history
  • Loading branch information
Narflex committed Jan 9, 2017
2 parents 1624801 + 1eaa228 commit e7b15b6
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 1 deletion.
1 change: 1 addition & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/ubuntuserver/
/ubuntuclient/
/clientrelease/
/pluginrelease/
/sagetv*.deb
/sagetv*.gz
/SageJar*.zip
Expand Down
3 changes: 2 additions & 1 deletion build/copyserverfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 25 additions & 0 deletions build/pluginfiles/OriginalV2.plugin.xml
Original file line number Diff line number Diff line change
@@ -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>
17 changes: 17 additions & 0 deletions build/pluginfiles/README.md
Original file line number Diff line number Diff line change
@@ -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.
25 changes: 25 additions & 0 deletions build/pluginfiles/SageTV3.plugin.xml
Original file line number Diff line number Diff line change
@@ -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>
44 changes: 44 additions & 0 deletions build/pluginfiles/build.xml
Original file line number Diff line number Diff line change
@@ -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>
73 changes: 73 additions & 0 deletions plugin-uploader.gradle
Original file line number Diff line number Diff line change
@@ -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 e7b15b6

Please sign in to comment.