Skip to content

Commit

Permalink
Merge pull request #11 from playground/build-cli
Browse files Browse the repository at this point in the history
Build cli
  • Loading branch information
playground authored Oct 15, 2021
2 parents 9dcf910 + 3ee1a3d commit 0643b1b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ Options:
"HZN_FSS_CSSURL": "<HZN_FSS_CSSURL>",
"SERVICE_NAME": "<YOUR_SERVICE_NAME>",
"SERVICE_VERSION": "<YOUR_SERVICE_VERSION>",
"SERVICE_CONTAINER_NAME": "<YOUR_SERVICE_CONTAINER_NAME>",
"SERVICE_CONTAINER_CREDS": "",
"YOUR_DOCKERHUB_ID": "<YOUR_DOCKERHUB_ID>",
"VOLUME_MOUNT": "<VOLUME_MOUNT>",
"MMS_SHARED_VOLUME": "<MMS_SHARED_VOLUME>",
"MMS_CONTAINER_CREDS": "",
"MMS_CONTAINER_NAME": "<MMS_CONTAINER_NAME>",
"MMS_SERVICE_NAME": "<MMS_SERVICE_NAME>",
"MMS_SERVICE_VERSION": "<MMS_SERVICE_VERSION>",
"MMS_OBJECT_TYPE": "<MMS_OBJECT_TYPE>",
Expand All @@ -80,11 +82,13 @@ Options:
"HZN_FSS_CSSURL": "<HZN_FSS_CSSURL>",
"SERVICE_NAME": "<YOUR_SERVICE_NAME>",
"SERVICE_VERSION": "<YOUR_SERVICE_VERSION>",
"SERVICE_CONTAINER_NAME": "<YOUR_SERVICE_CONTAINER_NAME>",
"SERVICE_CONTAINER_CREDS": "",
"YOUR_DOCKERHUB_ID": "<YOUR_DOCKERHUB_ID>",
"VOLUME_MOUNT": "<VOLUME_MOUNT>",
"MMS_SHARED_VOLUME": "<MMS_SHARED_VOLUME>",
"MMS_CONTAINER_CREDS": "",
"MMS_CONTAINER_NAME": "<MMS_CONTAINER_NAME>",
"MMS_SERVICE_NAME": "<MMS_SERVICE_NAME>",
"MMS_SERVICE_VERSION": "<MMS_SERVICE_VERSION>",
"MMS_OBJECT_TYPE": "<MMS_OBJECT_TYPE>",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hzn-cli",
"version": "0.0.4",
"version": "0.0.5",
"description": "Open Horizon CLI toolkit helps streamline the process of preparing node agents and perform tasks between orgs environments",
"main": "./build/index.js",
"bin": {
Expand All @@ -9,7 +9,7 @@
"scripts": {
"start": "nodemon -e ts --watch 'src/**/*.ts' --exec 'npm run build'",
"build": "npx tsc && chmod +x build/*.js && chmod +x build/**/*.js",
"local": "sudo npm i -g && oh",
"local": "npm run build && sudo npm i -g && oh",
"refresh": "rm -rf ./node_modules ./package-lock.json && npm install"
},
"keywords": [
Expand Down
6 changes: 4 additions & 2 deletions src/common/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ export class Env {
});
}
setAdditionalEnv() {
let container = pEnv.MMS_CONTAINER_NAME || pEnv.MMS_SERVICE_NAME;
pEnv.MMS_PATTERN_NAME = `pattern-${pEnv.MMS_SERVICE_NAME}-${pEnv.ARCH}`;
pEnv.MMS_CONTAINER = `${pEnv.YOUR_DOCKERHUB_ID}/${pEnv.MMS_SERVICE_NAME}_${pEnv.ARCH}:${pEnv.MMS_SERVICE_VERSION}`.replace(/\r?\n|\r/g, '')
pEnv.MMS_CONTAINER = `${pEnv.YOUR_DOCKERHUB_ID}/${container}_${pEnv.ARCH}:${pEnv.MMS_SERVICE_VERSION}`.replace(/\r?\n|\r/g, '')
pEnv.PATTERN_NAME = `pattern-${pEnv.SERVICE_NAME}`;
pEnv.SERVICE_CONTAINER = `${pEnv.YOUR_DOCKERHUB_ID}/${pEnv.SERVICE_NAME}_${pEnv.ARCH}:${pEnv.SERVICE_VERSION}`.replace(/\r?\n|\r/g, '')
container = pEnv.SERVICE_CONTAINER_NAME || pEnv.SERVICE_NAME;
pEnv.SERVICE_CONTAINER = `${pEnv.YOUR_DOCKERHUB_ID}/${container}_${pEnv.ARCH}:${pEnv.SERVICE_VERSION}`.replace(/\r?\n|\r/g, '')
}
getEnv() {
return this.env;
Expand Down

0 comments on commit 0643b1b

Please sign in to comment.