Skip to content

Commit

Permalink
Merge pull request #86 from playground/auto-setup-4
Browse files Browse the repository at this point in the history
unRegisterAgent true
  • Loading branch information
playground authored Sep 8, 2023
2 parents bfdd65f + e9ca86c commit d09a20b
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ RUN rm /bin/sh && ln -s /bin/bash /bin/sh

RUN apt-get update -y && apt-get install -y apt-utils vim curl sudo

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get -y install nodejs
RUN npm install -g npm
RUN npm install -g hzn-cli
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ RUN rm /bin/sh && ln -s /bin/bash /bin/sh

RUN apt-get update -y && apt-get install -y apt-utils vim curl sudo

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get -y install nodejs
RUN npm install -g npm
RUN npm install -g hzn-cli
Expand Down
2 changes: 1 addition & 1 deletion build/common/src/hzn.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/common/src/hzn.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/common/src/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/common/src/utils.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions install-mgmt-hub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ set -e
# @playground

# Define versions
INSTALL_NODE_VER=16
INSTALL_NVM_VER=0.39.1
INSTALL_NODE_VER=20
INSTALL_NVM_VER=0.39.5

# You can pass argument to this script --version 8
if [ "$1" = '--version' ]; then
Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ if [[ -f "${HOME}/.nvm/nvm.sh" ]]; then
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
else echo "nvm not installed"
# Define versions
INSTALL_NODE_VER=16
INSTALL_NVM_VER=0.39.1
INSTALL_NODE_VER=20
INSTALL_NVM_VER=0.39.5

# You can pass argument to this script --version 8
if [ "$1" = '--version' ]; then
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hzn-cli",
"version": "0.6.6",
"version": "0.6.8",
"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 Down
2 changes: 1 addition & 1 deletion src/common/src/hzn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class Hzn {
return utils.shell(arg, 'done publishing mss pattern', 'failed to publish mms pattern', false);
}
unregisterAgent() {
return utils.unregisterAgent()
return utils.unregisterAgent(true)
}
register() {
return utils.register(this)
Expand Down
2 changes: 1 addition & 1 deletion src/common/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1900,7 +1900,7 @@ export class Utils {
observer.complete()
} else if(answer == 1) {
console.log('\x1b[32m', '\nRegister with a Policy')
this.registerWithPolicy(hzn.param.name, this.getPolicyJson(policyType.nodePolicy))
this.registerWithPolicy(hzn.param.name, this.getPolicyJson(policyType.nodePolicy), true)
.subscribe(() => {observer.next(1); observer.complete()})
} else if(answer == 2) {
console.log('\x1b[32m', '\nRegister with a Pattern')
Expand Down

0 comments on commit d09a20b

Please sign in to comment.