diff --git a/Makefile b/Makefile index 6f2bc4a0d..4556493c1 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ OS := $(shell uname -s) CONFIG_FILE?=config-files/config.yaml AGG_CONFIG_FILE?=config-files/config-aggregator.yaml -OPERATOR_VERSION=v0.2.1 +OPERATOR_VERSION=v0.3.0 ifeq ($(OS),Linux) BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux @@ -101,6 +101,12 @@ build_operator: deps @go build -ldflags "-X main.Version=$(OPERATOR_VERSION)" -o ./operator/build/aligned-operator ./operator/cmd/main.go @echo "Operator built into /operator/build/aligned-operator" +update_operator: + @echo "Updating Operator..." + @./scripts/fetch_latest_release.sh + @make build_operator + @./operator/build/aligned-operator --version + bindings: cd contracts && ./generate-go-bindings.sh diff --git a/docs/guides/1_SDK.md b/docs/guides/1_SDK.md index db72808a2..bdc7191c3 100644 --- a/docs/guides/1_SDK.md +++ b/docs/guides/1_SDK.md @@ -11,7 +11,7 @@ To use this SDK in your Rust project, add the following to your `Cargo.toml`: ```toml [dependencies] -aligned-sdk = { git = "https://github.com/yetanotherco/aligned_layer", tag="v0.2.1" } +aligned-sdk = { git = "https://github.com/yetanotherco/aligned_layer", tag="v0.3.0" } ``` To find the latest release tag go to [releases](https://github.com/yetanotherco/aligned_layer/releases) and copy the version of the release that has the `latest` badge. diff --git a/docs/operator_guides/0_running_an_operator.md b/docs/operator_guides/0_running_an_operator.md index e87e24a8c..50ce6b494 100644 --- a/docs/operator_guides/0_running_an_operator.md +++ b/docs/operator_guides/0_running_an_operator.md @@ -1,5 +1,8 @@ # Register as an Aligned operator in testnet +> **CURRENT VERSION:** +> Aligned Operator [v0.3.0](https://github.com/yetanotherco/aligned_layer/releases/tag/v0.3.0) + > **IMPORTANT:** > You must be [whitelisted](https://docs.google.com/forms/d/e/1FAIpQLSdH9sgfTz4v33lAvwj6BvYJGAeIshQia3FXz36PFfF-WQAWEQ/viewform) to become an Aligned operator. @@ -38,7 +41,7 @@ Minimum hardware requirements: To start with, clone the Aligned repository and move inside it ```bash -git clone https://github.com/yetanotherco/aligned_layer.git +git clone https://github.com/yetanotherco/aligned_layer.git --branch v0.3.0 cd aligned_layer ``` @@ -70,15 +73,20 @@ To build the operator binary, run: make build_operator ``` -To update the operator, run: +### Upgrading the Operator + +If you want to upgrade the operator, run: ```bash -git pull -make build_operator +make update_operator ``` This will recreate the binaries. You can then proceed to restart the operator. +You can find the latest version of the operator [here](https://github.com/yetanotherco/aligned_layer/releases). + +### Checking the Operator Version + To see the operator version, run: ```bash diff --git a/scripts/fetch_latest_release.sh b/scripts/fetch_latest_release.sh new file mode 100755 index 000000000..da1f0deb8 --- /dev/null +++ b/scripts/fetch_latest_release.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# The script fetches the latest release tag from the repository and checks out that tag. +git fetch --tags +latesttag=$(git describe --tags $(git rev-list --tags --max-count=1)) +echo checking out ${latesttag} +git checkout ${latesttag}