From 0a6b37b6f4bb90d6e1f7bea12d0079b43493e5e5 Mon Sep 17 00:00:00 2001 From: Sandor Muranyi Date: Mon, 23 Nov 2020 10:23:07 +0100 Subject: [PATCH] Use branching strategy instead of tags when deploy new core --- README.md | 4 ++-- ccontrol.sh | 7 +++---- functions.sh | 8 +++----- project.conf.devnet | 2 ++ project.conf.mainnet | 2 ++ 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 216d8cb..d79a462 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,8 @@ The end result is that your node will start syncing from 0. ### 2.6.31+p3 -- Upgraded to 4.0.1 SSI (project Morpheus, previously called DAC) -- Added 1.0.0 DNS (project Coeus) +- Upgraded to 4.0.4 SSI (project Morpheus, previously called DAC) +- Added DNS (project Coeus) ### 2.6.31+p2 diff --git a/ccontrol.sh b/ccontrol.sh index 84cde3e..456afd9 100755 --- a/ccontrol.sh +++ b/ccontrol.sh @@ -82,13 +82,13 @@ main () { cd $core > /dev/null 2>&1 git_check_core - local hydra_plugin_installed="$(cat $config/plugins.js | grep hydra-plugin)" + local hydra_plugin_installed="$(cat $config/plugins.js | grep '@internet-of-people/hydra-plugin')" if [ ! -f "$config/app.js" ]; then cp $core/packages/core/bin/config/$network/app.js $config/app.js fi - local hydra_appjs_installed="$(cat $config/app.js | grep hydra-plugin)" + local hydra_appjs_installed="$(cat $config/app.js | grep '@internet-of-people/hydra-plugin')" if [ "$up2date" = "yes" ] && [ ! -z "$hydra_plugin_installed" ] && [ ! -z "$hydra_appjs_installed" ]; then echo -e "Already up-to-date." @@ -96,8 +96,7 @@ main () { fi git checkout . - git fetch --tags 2>&1 - git checkout $network 2>&1 + git checkout $branch 2>&1 if [ "$?" != "0" ]; then rm yarn.lock > /dev/null 2>&1 diff --git a/functions.sh b/functions.sh index a96b2ae..0f3c9a4 100644 --- a/functions.sh +++ b/functions.sh @@ -35,10 +35,8 @@ pm2status () { git_check_core () { git fetch > /dev/null 2>&1 - git tag -d $network - git fetch --tags > /dev/null 2>&1 loc=$(git rev-parse --short @) - rem=$(git rev-parse --short $network) + rem=$(git rev-parse --short origin/$branch) if [ "$loc" = "$rem" ]; then up2date="yes" @@ -52,7 +50,7 @@ git_check () { git fetch > /dev/null 2>&1 loc=$(git rev-parse --short @) - rem=$(git rev-parse --short @{u}) + rem=$(git rev-parse --short origin/$branch) if [ "$loc" = "$rem" ]; then up2date="yes" @@ -303,7 +301,7 @@ install_db () { install_core () { - git clone $repo $core -b $network > /dev/null 2>&1 + git clone $repo $core -b $branch > /dev/null 2>&1 if [ -d $HOME/.config ]; then sudo chown -R $USER:$USER $HOME/.config > /dev/null 2>&1 diff --git a/project.conf.devnet b/project.conf.devnet index 235f61c..66bb107 100644 --- a/project.conf.devnet +++ b/project.conf.devnet @@ -3,5 +3,7 @@ #Network name network="devnet" +branch="develop" + #P2P port p2p_port="4702" \ No newline at end of file diff --git a/project.conf.mainnet b/project.conf.mainnet index 62d19ca..9c1753a 100644 --- a/project.conf.mainnet +++ b/project.conf.mainnet @@ -3,5 +3,7 @@ #Network name network="mainnet" +branch="master" + #P2P port p2p_port="4701" \ No newline at end of file