Skip to content

Commit

Permalink
fix(ci): Fix ci script OSX compatability
Browse files Browse the repository at this point in the history
Signed-off-by: Ben LeFevre <blefevre@users.noreply.github.com>
  • Loading branch information
blefevre authored and petermetz committed Feb 11, 2020
1 parent e78f646 commit 611fdfb
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Pre-requesits install

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright IBM Corp. All Rights Reserved.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Start the API wrapping methods to interact with fabric
if [ ! -d "../logs" ]; then
Expand All @@ -7,7 +7,7 @@ if [ ! -d "../logs" ]; then
fi

# Kill old SDK server
fuser -k -n tcp 4000
pid=$(lsof -i tcp:4000 -t); [ -z "$pid" ] || kill -TERM $pid || kill -KILL $pid

path_to_log_file="../logs/start.log"

Expand Down
2 changes: 1 addition & 1 deletion packages/core/examples/simple-asset-transfer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"corda": "cd corda/build/scripts && ./start_corda_components.sh ../../logs && cd ../../../",
"corda:down": "cd corda/build/scripts && ./stop_corda_components.sh ../../logs && cd ../../../",
"fabric": "cd fabric/scripts && ./start.sh",
"fabric:down": "fuser -k -n tcp 4000 ; docker-compose -f fabric/artifacts/docker-compose.yaml rm -sf",
"fabric:down": "pid=$(lsof -i tcp:4000 -t); [ -z \"$pid\" ] || kill -TERM $pid || kill -KILL $pid; docker-compose -f fabric/artifacts/docker-compose.yaml rm -sf",
"fabric:log": "docker-compose -f fabric/artifacts/docker-compose.yaml logs -f",
"fed:build": "docker build --no-cache --force-rm -t federation/validator .",
"fed:fabric": "docker-compose -p federation-fabric -f ./federations/docker-compose-fabric.yml --compatibility up --renew-anon-volumes -d",
Expand Down
7 changes: 4 additions & 3 deletions packages/core/tools/ci.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/bash
#!/usr/bin/env bash
###
### Continous Integration Shell Script
###
### Designed to be re-entrant on a local dev machine as well, not just on a
### newly pulled up VM.
###
echo $BASH_VERSION

STARTED_AT=`date +%s`
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
Expand Down Expand Up @@ -129,7 +130,7 @@ function mainTask()

ENDED_AT=`date +%s`
runtime=$((ENDED_AT-STARTED_AT))
echo "$(date -Iseconds) [CI] SUCCESS - runtime=$runtime seconds."
echo "$(date +%FT%T%z) [CI] SUCCESS - runtime=$runtime seconds."
exit 0
}

Expand All @@ -141,7 +142,7 @@ function onTaskFailure()

ENDED_AT=`date +%s`
runtime=$((ENDED_AT-STARTED_AT))
echo "$(date -Iseconds) [CI] FAILURE - runtime=$runtime seconds."
echo "$(date +%FT%T%z) [CI] FAILURE - runtime=$runtime seconds."
exit 1
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/tools/configure.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -x
#!/usr/bin/env bash -x

# Remove existing software that we want specific version.
sudo apt purge nodejs openjdk-\*
Expand Down
2 changes: 1 addition & 1 deletion packages/core/tools/dump-all-logs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
###
### Continous Integration Shell Script --- Dump All Logs
###
Expand Down
2 changes: 1 addition & 1 deletion tools/cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

cd $(dirname $0)/../examples/simple-asset-transfer/

Expand Down

0 comments on commit 611fdfb

Please sign in to comment.