diff --git a/public/install.sh b/public/install.sh index 1446216..b9a9c0b 100755 --- a/public/install.sh +++ b/public/install.sh @@ -20,12 +20,14 @@ if [ $GIT_IS_AVAILABLE != 0 ]; then exit 1; fi -if [ -d "$NEXUS_HOME/network-api" ]; then - echo "$NEXUS_HOME/network-api exists. Updating."; - (cd $NEXUS_HOME/network-api && git stash save && git pull) +REPO_PATH=$NEXUS_HOME/network-api +if [ -d "$REPO_PATH" ]; then + echo "$REPO_PATH exists. Updating."; + (cd $REPO_PATH && git stash save && git fetch --tags) else mkdir -p $NEXUS_HOME (cd $NEXUS_HOME && git clone https://github.com/nexus-xyz/network-api) fi +(cd $REPO_PATH && git -c advice.detachedHead=false checkout $(git rev-list --tags --max-count=1)) -(cd $NEXUS_HOME/network-api/clients/cli && cargo run --release --bin prover -- beta.orchestrator.nexus.xyz) +(cd $REPO_PATH/clients/cli && cargo run --release --bin prover -- beta.orchestrator.nexus.xyz)