Skip to content

Commit

Permalink
repository name fix for travis builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshthoomu committed May 13, 2016
1 parent ae58061 commit 3aa1fbc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install:
before_script:

- echo " CREATING BASE IMAGE "
- cd $HOME/gopath/src/github.com/$USER_NAME/$REPO_NAME/scripts && chmod +x foldercopy.sh && ./foldercopy.sh $TR_PULL_REQUEST $USER_NAME
- cd $HOME/gopath/src/github.com/$USER_NAME/$REPO_NAME/scripts && chmod +x foldercopy.sh && ./foldercopy.sh $TR_PULL_REQUEST $USER_NAME $REPO_NAME
- sudo rm -rf /var/hyperledger/ && sudo mkdir /var/hyperledger/ && sudo chown $USER:$USER /var/hyperledger
- cd /$HOME/gopath/src/github.com/hyperledger/fabric
- make unit-test
Expand Down
2 changes: 1 addition & 1 deletion scripts/containerlogs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ echo "$file"
cat $file | curl -sT - chunk.io

done

echo " >>>>> testsummary log file <<<< "
cat testsummary.log | curl -sT - chunk.io
30 changes: 26 additions & 4 deletions scripts/foldercopy.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
#!/bin/bash

if [ "$1" = "false" ] && [ "$2" != "hyperledger" ]; then

echo " Pull Request number is $1 "
echo " User Name is $2 "
echo " Repository Name is $3 "

rm -rf $HOME/gopath/src/github.com/hyperledger/
echo "Deleted hyperledger folder"
cp -r $HOME/gopath/src/github.com/$2 $HOME/gopath/src/github.com/hyperledger
echo "Copied User Directory into hyperledger"

echo "creating fabric folder to copy files"

mkdir -p $HOME/gopath/src/github.com/hyperledger/fabric

echo "hyperledger/fabric folder created"

cp -r $HOME/gopath/src/github.com/$2/$3/* $HOME/gopath/src/github.com/hyperledger/fabric/

echo "Copied $2 files into hyperledger/fabric folder"

elif [ "$2" != "hyperledger" ]; then
mv $HOME/gopath/src/github.com/$2 $HOME/gopath/src/github.com/hyperledger

mkdir -p $HOME/gopath/src/github.com/hyperledger/fabric

echo "hyperledger/fabric folder created"

cp -r $HOME/gopath/src/github.com/$2/$3/* $HOME/gopath/src/github.com/hyperledger/fabric/

echo "copied $2 user repo into hyperledger/fabric folder"

fi

0 comments on commit 3aa1fbc

Please sign in to comment.