Skip to content

Commit

Permalink
2.0.1 - using ffe-core@6.0.0, added flow.sh + build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Wendel committed May 20, 2016
1 parent 78f0dda commit a1e65a1
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 4 deletions.
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash -e

npm install
41 changes: 41 additions & 0 deletions flow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

# Makes functions inherit trap ERR
set -E


trap 'executionFailed ${LINENO}' ERR

function main() {
./build.sh

if should_publish; then
npm run has-published -s || npm publish
fi
}

function should_publish() {
[[ $GIT_BRANCH =~ ^(origin/)?master$ ]]
}

# Fail the build if someone tries to send it parameters since script doesn't handle params at the moment.
if [ $# -ne 0 ] ; then
echo "Failed the build. flow.sh does not support input parameters. Input parameters were '$@'"
exit 1;
fi

function executionFailed() {
# Called when some command fail execution
local self=$(basename "$0")
local parent_lineno="$1"
local message="$2"
local resultCode="${3:-1}"
if [[ -n "$message" ]]; then
echo "${self}: Error on or near line ${parent_lineno}: ${message}; exiting with status ${resultCode}"
else
echo "${self}: Error on or near line ${parent_lineno}; exiting with status ${resultCode}"
fi
exit "${resultCode}"
}

main
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ffe-message-box",
"version": "2.0.0",
"version": "2.0.1",
"description": "Meldingsboks",
"main": "index.js",
"scripts": {
Expand All @@ -13,16 +13,16 @@
"publishConfig": {
"registry": "***REMOVED***"
},
"author": "Ivar Nilsen <ivar.nilsen@sparebank1.no>",
"author": "SpareBank1",
"license": "ISC",
"peerDependencies": {
"ffe-core": "^5.3.0"
"ffe-core": "6.0.0"
},
"devDependencies": {
"less": "^2.6.1"
},
"dependencies": {
"ffe-core": "^5.3.0",
"ffe-core": "6.0.0",
"mkdirp": "^0.5.1"
}
}

0 comments on commit a1e65a1

Please sign in to comment.