Skip to content

Commit decdc2b

Browse files
committed
GitHub upload code
1 parent 6e11bc3 commit decdc2b

9 files changed

+63
-14
lines changed

build.properties

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#Build Number for ANT. Do not edit!
2-
#Fri Oct 31 11:08:35 GMT 2014
3-
#Sat, 01 Nov 2014 14:37:55 +0000
2+
#Wed Mar 09 20:29:03 GMT 2016
3+
build.number=1
44
build.date=2014/10/31 11\:08
5-
build.number=0
6-
build.version=0.0.1
5+
build.version=0.0.1

build.xml

Lines changed: 59 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project name="ReverbApi" default="copy" basedir=".">
3+
<property name="build.properties" value="build.properties"/>
4+
<property file="${build.properties}"/>
5+
<property name="local.properties" value="local.properties"/>
6+
<property file="${local.properties}"/>
37
<property name="src" value="src"/>
48
<property name="bin" value="bin"/>
59
<property name="lib" value="lib"/>
610
<property name="build" value="build"/>
11+
<property name="jar" value="reverb.jar"/>
12+
<property name="build.jar" location="${build}/${jar}"/>
13+
<property name="jar.depends" value="reverb-dependencies.jar"/>
14+
<property name="build.jar.depends" location="${build}/${jar.depends}"/>
15+
<property name="tools" location="tools"/>
16+
<property name="github" location="${tools}/github"/>
717
<property name="docs" value="docs"/>
8-
<property name="jar" location="${build}/reverb.jar"/>
9-
<property name="jar.depends" location="${build}/reverb-dependencies.jar"/>
10-
<property name="local.properties" value="local.properties"/>
11-
<property file="${local.properties}"/>
18+
19+
<fileset id="github-anttasks.jars" dir="${github}/lib">
20+
<include name="**/*.jar"/>
21+
</fileset>
22+
<path id="github-anttasks.classpath">
23+
<fileset refid="github-anttasks.jars"/>
24+
<pathelement location="."/>
25+
<fileset dir="${github}">
26+
<include name="**/*.jar"/>
27+
</fileset>
28+
</path>
29+
<taskdef name="github.createrelease" classname="com.github.api.CreateRelease" classpathref="github-anttasks.classpath" loaderref="github-anttasks.classpath.loader" />
30+
<taskdef name="github.uploadasset" classname="com.github.api.UploadAsset" classpathref="github-anttasks.classpath" loaderref="github-anttasks.classpath.loader" />
31+
<taskdef name="github.fullrelease" classname="com.github.api.FullRelease" classpathref="github-anttasks.classpath" loaderref="github-anttasks.classpath.loader" />
1232

1333
<condition property="is.mac">
1434
<os family="mac"/>
@@ -57,11 +77,28 @@
5777
</fileset>
5878
</path>
5979

60-
<target name="jar" depends="prepare">
80+
<target name="version.input" depends="prepare">
81+
<input
82+
message="Please input a new version. Current version ${build.version}"
83+
addproperty="new.version"
84+
/>
85+
<propertyfile file="${build.properties}">
86+
<entry key="build.version" value="${new.version}"/>
87+
</propertyfile>
88+
</target>
89+
<target name="version.default" depends="prepare">
90+
<property name="new.version" value="${build.version}"/>
91+
</target>
92+
<target name="version" depends="version.input" description="Prompt user to enter new version">
93+
<!-- At the moment version requires nothing else -->
94+
</target>
95+
96+
<target name="jar" depends="version.default">
97+
<buildnumber file="${build.properties}"/>
6198
<javac srcdir="${src}" destdir="${bin}" source="1.6" target="1.5" includes="**/*.java" includeantruntime="false" classpathref="class.path"/>
6299
<!--<exportjar dir="build"/>-->
63-
<jar jarfile="${jar}" basedir="${bin}" manifest="MANIFEST.MF"/>
64-
<zip destfile="${jar.depends}">
100+
<jar jarfile="${build.jar}" basedir="${bin}" manifest="MANIFEST.MF"/>
101+
<zip destfile="${build.jar.depends}">
65102
<zipgroupfileset dir="${build}" includes="reverb.jar"/>
66103
<zipgroupfileset dir="${lib}" includes="*.jar"/>
67104
</zip>
@@ -85,7 +122,7 @@
85122
echo('Entering JavaScript...');
86123
87124
var copy = project.createTask('copy');
88-
copy.setFile(new File(project.getProperty('jar')));
125+
copy.setFile(new File(project.getProperty('build.jar')));
89126
90127
var props = project.getProperty('copy.dirs').split(",");
91128
for (var i=0; i<props.length; i++) {
@@ -102,8 +139,21 @@
102139
</java>
103140
</target>
104141

105-
<target name="release" depends="jar">
142+
<target name="release" depends="version,jar">
143+
<echo message="${new.version}"/>
106144
<echo message="TODO: Auto deploy release to github, reverb.jar, reverb-dependencies.jar, JSON-java.jar"/>
145+
<!--<github.fullrelease
146+
repouser="${github.repouser}"
147+
repo="${github.repo}"
148+
tokenuser="${github.tokenuser}"
149+
token="${github.token}"
150+
tag="${new.version}"
151+
body="Reverb.com API Java library version ${new.version}">
152+
<fileset dir="${build}" casesensitive="yes">
153+
<include name="${jar}"/>
154+
<include name="${jar.depends}"/>
155+
</fileset>
156+
</github.fullrelease>-->
107157
</target>
108158

109159
<target name="list">

local.example.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
dir.copyto=./build/
44
github.repo=reverb-api-json
55
github.repouser=jamesdlow
6-
github.user=
76
github.token=
7+
github.tokenuser=
88
reverb.token=

tools/github/github-ant.jar

15 KB
Binary file not shown.

tools/github/lib/commons-io-2.4.jar

181 KB
Binary file not shown.

tools/github/lib/github-api-1.59.jar

151 KB
Binary file not shown.
37.7 KB
Binary file not shown.
220 KB
Binary file not shown.
1.03 MB
Binary file not shown.

0 commit comments

Comments
 (0)