Skip to content

Commit

Permalink
Merge pull request #19 from maticnetwork/djpolygon/DEVOPS-2592
Browse files Browse the repository at this point in the history
Initial update for bor updates
  • Loading branch information
djpolygon authored Oct 23, 2024
2 parents 968686f + 9a732d8 commit f78a35d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ Simply pass the version tag as the first argument to the installation script. No
./bor.sh 0.2.14-tmp-span-hotfix
```

#### Installing PBSS profiles
```shell
./bor.sh $version $network pbss-$network-$type
```
Where $version is desired version, $network is mainnet or amoy, and $type is defined as sentry or validator as PBSS does not support bootnode or archive.



### Heimdall

Expand Down
21 changes: 11 additions & 10 deletions bor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,27 @@ if [ ! -z "$1" ]; then
fi

if [ ! -z "$2" ]; then
if [ "$2" = "mainnet" ] || [ "$2" = "mumbai" ] || [ "$2" = "amoy" ]; then
if [ "$2" = "mainnet" ] || [ "$2" = "amoy" ]; then
network="$2"
else
echo "Invalid network: $2, choose from 'mainnet' or 'mumbai' or 'amoy'"
echo "Invalid network: $2, choose from 'mainnet' or 'amoy'"
exit 1
fi
fi

if [ ! -z "$3" ]; then
if [ "$3" = "sentry" ] || [ "$3" = "validator" ] || [ "$3" = "archive" ] || [ "$3" = "bootnode" ]; then
if [ "$3" = "sentry" ] || [ "$3" = "pbss-$2-sentry" ] || [ "$3" = "validator" ] || [ "$3" = "pbss-$2-validator" ] || [ "$3" = "archive" ] || [ "$3" = "bootnode" ]; then
nodetype="$3"
else
echo "Invalid node type: $3, choose from 'sentry', 'validator', 'archive', or 'bootnode'"
echo "Invalid node type: $3, choose from 'sentry', 'pbss-$2-sentry', 'validator', 'pbss-$2-validator', 'archive', or 'bootnode'"
exit 1
fi
fi

if [[ $version > "0.3" ]]; then
tag=v${version}
profileInfo=${network}-${nodetype}-config_v${version}
profileInforpm=${network}-${nodetype}-config-v${version}
else
echo "Version is less than 0.3, ignoring network and node type"
tag=${version}
Expand All @@ -92,15 +93,15 @@ case "$(uname -s).$(uname -m)" in
type="deb"
if [[ $version > "0.3" ]]; then
binary="bor-${tag}-amd64.deb"
profile="bor-${profileInfo}-amd64.deb"
profile="bor-${profileInfo}-all.deb"
else
binary="bor_${tag}_linux_amd64.deb"
fi
elif command -v rpm &> /dev/null; then
type="rpm"
if [[ $version > "0.3" ]]; then
binary="bor-${tag}-amd64.rpm"
profile="bor-${profileInfo}-amd64.rpm"
binary="bor-${tag}.x86_64.rpm"
profile="bor-${profileInforpm}.noarch.rpm"
else
binary="bor_${tag}_linux_amd64.rpm"
fi
Expand All @@ -123,15 +124,15 @@ case "$(uname -s).$(uname -m)" in
type="deb"
if [[ $version > "0.3" ]]; then
binary="bor-${tag}-arm64.deb"
profile="bor-${profileInfo}-arm64.deb"
profile="bor-${profileInfo}-all.deb"
else
binary="bor_${tag}_linux_arm64.deb"
fi
elif command -v rpm &> /dev/null; then
type="rpm"
if [[ $version > "0.3" ]]; then
binary="bor-${tag}-arm64.rpm"
profile="bor-${profileInfo}-arm64.rpm"
binary="bor-${tag}.aarch64.rpm"
profile="bor-${profileInforpm}.noarch.rpm"
else
binary="bor_${tag}_linux_arm64.rpm"
fi
Expand Down

0 comments on commit f78a35d

Please sign in to comment.