Skip to content

Commit

Permalink
Merge pull request #689 from WPFerg/master
Browse files Browse the repository at this point in the history
Release 10.0.0-rc.2	[Master]
  • Loading branch information
WPFerg committed Mar 18, 2016
2 parents 1f99f21 + e3b29d7 commit 7f4bb19
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 16 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ sudo: false
install:
- npm install
- npm install -g grunt-cli
- npm install -g npm@'>=2.13.5'
- npm install -g npm@'>=2.13.5'

env:
global:
- GH_REF: github.com/ScottLogic/StockFlux.git
- secure: ecJ7bY21fCUBzUnlK11lZWC8lZyXrIxK3jkz6NuI9uEQ0lthmL10s0N+makYA9MJApgm6bgcPQNzJRDZ8ogxMTwMNeD+r4Hj8TcNzI4Mze03KdzGzWv7pY6uW5A2OoonOOLWvIJjK4RZqKTBNbbPt1TWgwS+DY02+QKveUiOsKWKeQ16N1qcH0xPT2cQP98TbioMuBF0hBMekfDmF+RqLPvCzR0Q2QYsh0Yb2uCGdMDQw+VJjlTdNWNaLss+i6DxRjvAm1mecK6OsCsGNJG2fV5DmURSBeP4BD4r+0skLPmYtkiNkJ8bXnDdQwLMbHOwfzxgyE6a2gMdSsR4AQMofjXzFQfwfF/RsC6q7LjvalsytLOJAn1XS7IZ+WRn/PHx7+ceRRCsQYd/dRkWMQgYh6c+cvNSV7yDnnxsbVsrdNP2DIIB+KYLMWD90PH4fH0xlyPvULTjGoJfiKBwjSzNB7Vu8H0M7YtjUD334stI1oTvQwgvN0SA6MWe2BvEBv2avFu5IQ7Kv3mySvlYcFZxHidxTBytKDW809UPs3yHGLCLLvhAnF2BtcvOsqzWKjd5VPUYzGGwEzNeWtiQNyyLNEF5K+/zeeqILEN39YRMQtRjtx8MTzQ9NMz3U3si17htfRHB/R5aO6SWJzABWO+uK3SL2zA6IL5c+9polElssIw=

after_success: bash ./deploy.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Here are a few things to try:

## Installing

In order to install the application, download [StockFlux installer zipfile](http://scottlogic.github.io/StockFlux/StockFlux.zip), unzip and run the executable. If you haven't already installed an OpenFin application, this will install the required runtime. It'll also add shortcuts to StockFlux to your desktop and start menu.
In order to install the application, download [StockFlux installer zipfile](http://scottlogic.github.io/StockFlux/master/StockFlux.zip), unzip and run the executable. If you haven't already installed an OpenFin application, this will install the required runtime. It'll also add shortcuts to StockFlux to your desktop and start menu.

This is an 'evergreen' application, each time it launches the application code is downloaded (from GitHub pages), ensuring that it is always up-to-date.

Expand Down
47 changes: 47 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env bash
set -eo pipefail
if ([ $TRAVIS_PULL_REQUEST == "false" ] && [ "${TRAVIS_REPO_SLUG}" == "ScottLogic/StockFlux" ] && ([ $TRAVIS_BRANCH == "dev" ] || [ $TRAVIS_BRANCH == "master" ]))
then
#Clone the latest gh-pages
git clone https://github.com/ScottLogic/StockFlux.git --branch gh-pages gh-pages

#Get line with version from the file -> get the second word -> remove quotes around the value
VERSION=$(grep "version" package.json | awk -v N=$2 '{print $2}' | cut -d \" -f2)
echo "Version is: $VERSION"

#Get line with the release type (develop/master) from the file -> get the second word -> remove quotes around the value
TYPE=$(grep "type" package.json | awk -v N=$2 '{print $2}' | cut -d \" -f2)
echo "Type is: $TYPE"

if ([ -z "$TYPE" ] || [ -z "$VERSION" ])
then
echo "Version or Type not set in package.json"
exit 1
fi

rm -rf "./gh-pages/$TYPE"
cp -r "./public" "./gh-pages/$TYPE"
rm -rf "./gh-pages/$VERSION"
cp -r "./public" "./gh-pages/$VERSION"
cd gh-pages

#Removing git history
rm -rf .git
git init

# inside this git repo we'll pretend to be a new user
git config user.name "Travis CI"
git config user.email "[email protected]"

# The first and only commit to this new Git repo contains all the
# files present with the commit message "Deploy to GitHub Pages".
git add .
git commit -m "Deploy to GitHub Pages"

# Force push from the current repo's master branch to the remote
# repo's gh-pages branch. (All previous history on the gh-pages branch
# will be lost, since we are overwriting it.) We redirect any output to
# /dev/null to hide any sensitive credential data that might otherwise be exposed.
echo "Pushing to: https://${GH_TOKEN}@${GH_REF}"
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1
fi
14 changes: 11 additions & 3 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
'use strict';
module.exports = function(grunt) {
var target = grunt.option('target') || 'http://localhost:5000',
port = process.env.PORT || 5000;
port = process.env.PORT || 5000,
version = grunt.file.readJSON('package.json').version,
type = grunt.file.readJSON('package.json').type;

grunt.initConfig({
'gh-pages': {
Expand Down Expand Up @@ -87,9 +89,15 @@ module.exports = function(grunt) {
},

download: {
//One zip for release type (development/master) and one for the version are created here
openfinZip: {
src: ['https://dl.openfin.co/services/download?fileName=StockFlux&config=http://scottlogic.github.io/StockFlux/app.json'],
dest: './public/StockFlux.zip'
src: ['https://dl.openfin.co/services/download?fileName=StockFlux-' + version +
'&config=http://scottlogic.github.io/StockFlux/' + version + '/app.json'],
dest: './public/StockFlux-' + version + '.zip'
},
openfinTypeZip: {
src: ['https://dl.openfin.co/services/download?fileName=StockFlux-' + type + '&config=http://scottlogic.github.io/StockFlux/' + type + '/app.json'],
dest: './public/StockFlux-' + type + '.zip'
}
},

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "bitflux-openfin",
"version": "10.0.0-rc.1",
"version": "10.0.0-rc.2",
"type": "master",
"scripts": {
"test": "grunt ci",
"postinstall": "cd node_modules/BitFlux && npm i"
Expand Down
8 changes: 4 additions & 4 deletions src/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
"defaultHeight": 0,
"frame": false,
"showTaskbarIcon": false,
"url": "http://scottlogic.github.io/StockFlux/parent.html",
"applicationIcon": "http://scottlogic.github.io/StockFlux/favicon.ico"
"url": "http://scottlogic.github.io/StockFlux/develop/parent.html",
"applicationIcon": "http://scottlogic.github.io/StockFlux/develop/favicon.ico"
},
"runtime": {
"arguments": "",
"arguments": "--enable-aggressive-domstorage-flushing",
"version": "stable"
},
"shortcut": {
"company": "ScottLogic",
"description": "Hosts BitFlux as an OpenFin application.",
"icon": "http://scottlogic.github.io/StockFlux/favicon.ico",
"icon": "http://scottlogic.github.io/StockFlux/develop/favicon.ico",
"name": "StockFlux"
}
}
2 changes: 1 addition & 1 deletion src/assets/styles/custom-scroll.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
margin-bottom: 10px;
}

#favourite-scroll {
&#favourite-scroll {
top: @toolbar-height;
bottom: @bottom-tab-height;
position: absolute;
Expand Down
6 changes: 2 additions & 4 deletions src/sidebars/favourites/favourite-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,14 @@
// Repeat the check as in the mean time a stock for this favourite could have been added.
if (this.stocks.map((stock1) => { return stock1.code; }).indexOf(favourite) === -1) {
var data = stock && stock.data && stock.data[0],
price,
delta,
percentage;
delta = data.close - data.open;
if (data) {
this.stocks.push({
favourite: true,
name: stock.name,
code: stock.code,
price: data.close,
delta: data.close - data.open,
delta: delta,
percentage: delta / data.open * 100,
index: this.stockSortFunction(stock)
});
Expand Down
2 changes: 1 addition & 1 deletion src/version-value.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';

const VERSION = { version: '10.0.0-rc.1' };
const VERSION = { version: '10.0.0-rc.2' };

angular.module('stockflux.version')
.value('Version', VERSION.version);
Expand Down

0 comments on commit 7f4bb19

Please sign in to comment.