Skip to content

Commit

Permalink
add git submodule to npm install
Browse files Browse the repository at this point in the history
  • Loading branch information
mbwhite committed Feb 28, 2017
2 parents 240110b + 94c8724 commit 341d4cb
Show file tree
Hide file tree
Showing 664 changed files with 8,090 additions and 2,225 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@
[submodule "packages/composer-runtime-hlf/vendor/github.com/robertkrimen/otto"]
path = packages/composer-runtime-hlf/vendor/github.com/robertkrimen/otto
url = https://github.com/robertkrimen/otto
[submodule "packages/composer-runtime-hlfv1/vendor/github.com/robertkrimen/otto"]
path = packages/composer-runtime-hlfv1/vendor/github.com/robertkrimen/otto
url = https://github.com/robertkrimen/otto.git
[submodule "packages/composer-runtime-hlfv1/vendor/gopkg.in/sourcemap.v1"]
path = packages/composer-runtime-hlfv1/vendor/gopkg.in/sourcemap.v1
url = https://gopkg.in/sourcemap.v1.git
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
language: node_js
node_js:
- '4'
- '6'
matrix:
include:
- env: DOCS=full FC_TASK=docs
sudo: false
node_js :
- '4'
- '6'
- env: SYSTEST=embedded FC_TASK=systest
- env: SYSTEST=web FC_TASK=systest
- env: SYSTEST=hlf SYSTEST_HLF=hlf FC_TASK=systest
Expand All @@ -29,7 +28,7 @@ before_install: |
date
install: |
date
./.travis/install.sh
travis_wait 30 ./.travis/install.sh
date
script: ./.travis/script.sh
deploy:
Expand Down
23 changes: 17 additions & 6 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ "${ABORT_BUILD}" = "true" ]; then
fi

# Check that this is the right node.js version.
if [ "${TRAVIS_NODE_VERSION}" != "" -a "${TRAVIS_NODE_VERSION}" != "4" ]; then
if [ "${TRAVIS_NODE_VERSION}" != "" -a "${TRAVIS_NODE_VERSION}" != "6" ]; then
echo Not executing as not running primary node.js version.
exit 0
fi
Expand Down Expand Up @@ -68,7 +68,7 @@ if [ -z "${TRAVIS_TAG}" ]; then

# Publish with unstable tag. These are development builds.
echo "Pushing with tag unstable"
lerna exec --ignore 'composer-systests' -- npm publish --tag=unstable 2>&1 | tee
lerna exec --ignore '@(composer-systests|composer-website)' -- npm publish --tag=unstable 2>&1 | tee

# Build, tag, and publish Docker images.
for i in ${DOCKER_IMAGES}; do
Expand All @@ -83,14 +83,23 @@ if [ -z "${TRAVIS_TAG}" ]; then

done

# Push to public Bluemix.
pushd ${DIR}/packages/composer-ui
cf login -a https://api.ng.bluemix.net -u ${CF_USERNAME} -p ${CF_PASSWORD} -o ${CF_ORGANIZATION} -s ${CF_SPACE}
cf push fabric-composer-unstable -c "node cli.js" -i 2 -m 256M --no-start
cf set-env fabric-composer-unstable CLIENT_ID ${GH_UNSTABLE_OAUTH_CLIENT_ID}
cf set-env fabric-composer-unstable CLIENT_SECRET ${GH_UNSTABLE_OAUTH_CLIENT_SECRET}
cf start fabric-composer-unstable
popd

else

# Grab the current version.
export VERSION=$(node -e "console.log(require('${DIR}/package.json').version)")

# Publish with latest tag (default). These are release builds.
echo "Pushing with tag latest"
lerna exec --ignore 'composer-systests' -- npm publish 2>&1 | tee
lerna exec --ignore '@(composer-systests|composer-website)' -- npm publish 2>&1 | tee

# Build, tag, and publish Docker images.
for i in ${DOCKER_IMAGES}; do
Expand All @@ -106,10 +115,12 @@ else
done

# Push to public Bluemix.
pushd ${DIR}/packages/composer-ui/dist
touch Staticfile
pushd ${DIR}/packages/composer-ui
cf login -a https://api.ng.bluemix.net -u ${CF_USERNAME} -p ${CF_PASSWORD} -o ${CF_ORGANIZATION} -s ${CF_SPACE}
cf push fabric-composer
cf push fabric-composer -c "node cli.js" -i 2 -m 256M --no-start
cf set-env fabric-composer CLIENT_ID ${GH_OAUTH_CLIENT_ID}
cf set-env fabric-composer CLIENT_SECRET ${GH_OAUTH_CLIENT_SECRET}
cf start fabric-composer
popd

# Configure the Git repository and clean any untracked and unignored build files.
Expand Down
8 changes: 4 additions & 4 deletions .travis/deploy_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ git config user.email "[email protected]"
git config push.default simple

echo ${DIR}
cd "${DIR}/packages/site/out"
cd "${DIR}/packages/composer-website/out"

export REPO="fabric-composer.github.io"

git clone [email protected]:fabric-composer/${REPO}.git
git remote set-url origin ${REPO}.git

cd "${DIR}/packages/site/out/${REPO}"
cd "${DIR}/packages/composer-website/out/${REPO}"

rm -rf ${DIR}/packages/site/out/${REPO}/*
cp -rf ${DIR}/packages/site/jekylldocs/_site/* .
rm -rf ${DIR}/packages/composer-website/out/${REPO}/*
cp -rf ${DIR}/packages/composer-website/jekylldocs/_site/* .

git add .

Expand Down
2 changes: 1 addition & 1 deletion .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi

# are we building the docs?
if [ "${DOCS}" != "" ]; then
cd "${DIR}/packages/site"
cd "${DIR}/packages/composer-website"
npm install
npm run full
# Are we running system tests?
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Fabric Composer is an application development framework which simplifies and expedites the creation of [Hyperledger fabric](https://hyperledger-fabric.readthedocs.io/en/latest/) blockchain applications. If you're new to Blockchain, Hyperledger fabric or Fabric Composer, we recommend that you start at the [Fabric composer website](https://fabric-composer.github.io). This site will help you get up and running by developing a sample blockchain application to buy and sell houses and apartments in a digital property business network.

[![Build Status](https://travis-ci.org/fabric-composer/fabric-composer.svg?branch=master)](https://travis-ci.org/fabric-composer/fabric-composer)

# Using this repository

Clone this repository.
Expand Down
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"lerna": "2.0.0-beta.37",
"lerna": "2.0.0-beta.32",
"packages": [
"packages/*"
],
"version": "0.4.4"
"version": "0.4.5"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"name": "fabric-composer",
"description": "You must install [Lerna](https://lernajs.io) to build this multi-package repository.",
"version": "0.4.4",
"version": "0.4.5",
"main": "index.js",
"private": true,
"scripts": {
Expand All @@ -32,4 +32,4 @@
],
"author": "Fabric Composer",
"license": "Apache-2"
}
}
11 changes: 8 additions & 3 deletions packages/composer-admin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"name": "composer-admin",
"version": "0.4.4",
"version": "0.4.5",
"description": "Fabric Composer Admin, code that manages business networks deployed to Hyperledger Fabric",
"engines": {
"node": ">=6",
"npm": ">=3"
},
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
Expand Down Expand Up @@ -43,8 +47,9 @@
"sinon-as-promised": "^4.0.2"
},
"dependencies": {
"composer-common": "^0.4.4",
"composer-connector-hlf": "^0.4.4"
"composer-common": "^0.4.5",
"composer-connector-hlf": "^0.4.5",
"composer-connector-hlfv1": "^0.4.5"
},
"license-check-config": {
"src": [
Expand Down
24 changes: 0 additions & 24 deletions packages/composer-admin/scripts/generate-uml.sh

This file was deleted.

25 changes: 11 additions & 14 deletions packages/composer-cli/lib/cmds/network/lib/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class List {
,assets : {}
};
listOutput.registries[registry.id] = entry;

return List.getMatchingAssets(registry, argv, businessNetworkConnection)
.then ((result) => {
let assetSet = result;
Expand All @@ -115,6 +114,9 @@ class List {
})
.then ((result) => {
return businessNetworkConnection.disconnect();
})
.catch(error => {
console.log(error);
});
}

Expand Down Expand Up @@ -161,26 +163,21 @@ class List {

/**
* Get required assets from a specific registry
* @param {registry} registry to search for assets
* @param {Registry} registry to search for assets
* @param {argv} argv program arguments
* @param {businessNetworkConnectionargv} businessNetworkConnection program arguments
* @param {BusinessNetworkConnection} businessNetworkConnection program arguments
* @return {Promise} promise with array of registries matching the requested registry
*/
static getMatchingAssets(registry, argv, businessNetworkConnection) {
if (argv.asset === undefined) {
return Promise.resolve([]);
} else if (argv.asset === '') {
if (!argv.asset) {
return registry.getAll();
} else {
return registry.exists(argv.asset)
.then ((exists) => {
if (exists === true) {
return registry.get(argv.asset)
.then ((asset) => {
return [asset];
});
return registry.get(argv.asset)
.then ((asset) => {
if (asset === true) {
return [asset];
} else {
throw new Error('Asset '+argv.asset+' does not exist');
throw new Error('Asset '+registry.id+' does not exist');
}
});
}
Expand Down
12 changes: 8 additions & 4 deletions packages/composer-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"name": "composer-cli",
"version": "0.4.4",
"version": "0.4.5",
"description": "Fabric Composer command line interfaces (CLIs)",
"engines": {
"node": ">=6",
"npm": ">=3"
},
"bin": {
"composer": "cli.js"
},
Expand Down Expand Up @@ -37,9 +41,9 @@
"sinon-as-promised": "^4.0.2"
},
"dependencies": {
"composer-admin": "^0.4.4",
"composer-client": "^0.4.4",
"composer-common": "^0.4.4",
"composer-admin": "^0.4.5",
"composer-client": "^0.4.5",
"composer-common": "^0.4.5",
"homedir": "^0.6.0",
"moment": "^2.17.1",
"npm-paths": "^0.1.3",
Expand Down
20 changes: 0 additions & 20 deletions packages/composer-cli/scripts/api-changelog.sh

This file was deleted.

45 changes: 0 additions & 45 deletions packages/composer-cli/scripts/deploy.sh

This file was deleted.

10 changes: 0 additions & 10 deletions packages/composer-cli/scripts/install-deps.sh

This file was deleted.

2 changes: 1 addition & 1 deletion packages/composer-client/lib/assetregistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const REGISTRY_TYPE = 'Asset';

/**
* The AssetRegistry is used to manage a set of assets stored on the blockchain.
* <p><a href="./diagrams/assetregistry.svg"><img src="./diagrams/assetregistry.svg" style="width:100%;"/></a></p>
* <p><a href="./diagrams/assetregistry.svg"><img src="./diagrams/assetregistry.svg" style="height:100%;"/></a></p>
* @extends Registry
* @see See [Registry]{@link module:composer-client.Registry}
* @class
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-client/lib/participantregistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const REGISTRY_TYPE = 'Participant';

/**
* The ParticipantRegistry is used to manage a set of participants stored on the blockchain.
* <p><a href="./diagrams/participantregistry.svg"><img src="./diagrams/participantregistry.svg" style="width:100%;"/></a></p>
* <p><a href="./diagrams/participantregistry.svg"><img src="./diagrams/participantregistry.svg" style="height:100%;"/></a></p>
* @extends Registry
* @see See [Registry]{@link module:composer-client.Registry}
* @class
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-client/lib/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Util = require('composer-common').Util;

/**
* Class representing an Abstract Registry.
* <p><a href="./diagrams/registry.svg"><img src="./diagrams/registry.svg" style="width:100%;"/></a></p>
* <p><a href="./diagrams/registry.svg"><img src="./diagrams/registry.svg" style="height:100%;"/></a></p>
* @abstract
* @class
* @memberof module:composer-client
Expand Down
Loading

0 comments on commit 341d4cb

Please sign in to comment.