Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Nov 26, 2024
1 parent 9bd5816 commit 1a831b2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
31 changes: 31 additions & 0 deletions scripts/rpc_repo_to_horizon_repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

# rpc_repo_to_horizon_repo.sh - given an rpc branch to horizon branch
#
# Syntax: rpc_repo_to_horizon_repo.sh <rpc_branch_name>
#
# Examples: rpc_repo_to_horizon_repo.sh main

set -e
set -o pipefail

if [ "$#" -ne 1 ]; then
echo "Syntax: ${0} <rpc_branch_name>"
exit 1
fi

GO_MONOREPO=github.com/stellar/go
RPC_BRANCH=$1
RPC_REPO_GOMOD=https://raw.githubusercontent.com/stellar/stellar-rpc/${RPC_BRANCH}/go.mod

# find the short commit from the stellar-rpc repository.
SHORT_COMMIT=$(curl -s ${RPC_REPO_GOMOD} -o - | grep "${GO_MONOREPO} " | cut -d- -f3)

# find the long commit from the actual go repository using the short commit.
TEMPDIR=$(mktemp -d)
git clone -q https://${GO_MONOREPO}.git ${TEMPDIR}
CURRENT_DIR=$(pwd)
cd ${TEMPDIR}
git rev-parse ${SHORT_COMMIT}
rm -rf ${TEMPDIR}
cd ${CURRENT_DIR}
31 changes: 0 additions & 31 deletions scripts/soroban_repo_to_horizon_repo.sh

This file was deleted.

0 comments on commit 1a831b2

Please sign in to comment.