Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions buildScript/publish-to-github.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ var request = require('request');
var ffdesc = 'This standalone release enable Firefly to run without additional dependencies beside Java 1.8. \n' +
'It comes with an embedded Tomcat 7. \n\n' +
'To start Firefly: \n' +
'java -jar fftools-exec.war \n\n' +
'By default, it will start up on port 8080. Goto to http://localhost:8080/fftools/ after it has started. \n' +
'java -jar firefly-exec.war \n\n' +
'By default, it will start up on port 8080. Goto to http://localhost:8080/firefly/ after it has started. \n' +
'To start it on a different port, add -httpPort to the java command. \n\n' +
'This will extract the content of the war file into a directory called ".extract" in your current directory. \n' +
'To change this, add -extractDirectory to the java command. \n\n';
Expand All @@ -27,7 +27,7 @@ if (args.tag && args.assets) {

var rel_config = {
token: '',
owner: 'lsst',
owner: 'Caltech-IPAC',
repo: 'firefly',
tag: '',
name: args.tag,
Expand All @@ -52,8 +52,11 @@ if (args.tag && args.assets) {
process.exit(1);
}

function getChangeLog(rel_config, lastdate) {
var cmd = 'git log --pretty=format:"%h - %s [%cd]" --date=short --after="' + lastdate +'"';
function getChangeLog(rel_config, lastRel) {
lastRel = lastRel || 'master';
var cmd = 'git log --pretty=format:"%h - %s [%cd]" --date=short ' + lastRel + '..HEAD';

console.log( 'CMD: ' + cmd);

// push changes to github..
exec(cmd, function (error, stdout, stderr) {
Expand All @@ -68,7 +71,7 @@ function getChangeLog(rel_config, lastdate) {
function checkGitHub(rel_config, callback) {

request({
uri: rel_config.apiUrl + '/repos/' + rel_config.owner + '/' + rel_config.repo + '/commits/master',
uri: rel_config.apiUrl + '/repos/' + rel_config.owner + '/' + rel_config.repo + '/releases',
method: 'GET',
headers: {
'Authorization': 'token ' + rel_config.token,
Expand All @@ -77,17 +80,14 @@ function checkGitHub(rel_config, callback) {
}, function (err, res, body) {
if (err) return callback(err);
var result = JSON.parse(body);
console.log( 'github latest commit: ' + result.sha );
callback(rel_config, result.commit.author.date);
console.log( 'github latest release: ' + result.tag_name );
callback(rel_config, result.tag_name);
});
}

function doPublish(rel_config) {

rel_config.notes = ffdesc + rel_config.notes;
execSync('git remote add lsst https://' + rel_config.token +'@github.com/lsst/firefly.git');
execSync('git push --tags -f lsst HEAD:master');
execSync('git remote rm lsst');

publishRelease(rel_config,
function (err, release) {
Expand Down
73 changes: 73 additions & 0 deletions src/firefly/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<properties>
<tomcat.version>7.0.59</tomcat.version>
<build.dir>${project.basedir}/../../build/firefly</build.dir>
</properties>

<modelVersion>4.0.0</modelVersion>

<groupId>edu.caltech.ipac</groupId>
<artifactId>firefly</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>firefly</name>
<description>A standalone version of Firefly with embedded Tomcat</description>

<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<name>Apache Snapshots</name>
<url>http://repository.apache.org/content/groups/snapshots-group/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<build>
<finalName>${project.artifactId}</finalName>
<directory>${build.dir}/exec/</directory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webappDirectory>${build.dir}/gwt/firefly</webappDirectory>
<outputDirectory>${build.dir}/exec/</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.3-SNAPSHOT</version>
<executions>
<execution>
<id>tomcat-run</id>
<goals>
<goal>exec-war-only</goal>
</goals>
<phase>package</phase>
<configuration>
<path>/firefly</path>
<finalName>firefly-exec.war</finalName>
</configuration>
</execution>
</executions>

<dependencies>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
<version>${tomcat.version}</version>
</dependency>

</dependencies>
</plugin>
</plugins>
</build>
</project>