Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,17 @@ toc:
latest-versions:
./ops/scripts/latest-versions.sh

# Usage:
# just update-op-geth 2f0528b
# just update-op-geth v1.101602.4
# just update-op-geth optimism
update-op-geth ref:
@ref="{{ref}}"; \
if [ -z "$ref" ]; then echo "error: provide a hash/tag/branch"; exit 1; fi; \
tmpl=$(printf "\173\173.Version\175\175"); \
ver=$(go list -m -f "$tmpl" github.com/ethereum-optimism/op-geth@"$ref"); \
if [ -z "$ver" ]; then echo "error: couldn't resolve $ref"; exit 1; fi; \
go mod edit -replace=github.com/ethereum/go-ethereum=github.com/ethereum-optimism/op-geth@"$ver"; \
go mod tidy; \
echo "Updated op-geth to $ver"