mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-21 10:41:18 +00:00
merge.sh file for the repo merge
This commit is contained in:
parent
f9e3db0373
commit
5aecd32554
53
merge.sh
Normal file
53
merge.sh
Normal file
@ -0,0 +1,53 @@
|
||||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
# NOTE: go-alert depends on go-common
|
||||
|
||||
REPOS=("autofile" "clist" "db" "events" "flowrate" "logger" "process")
|
||||
|
||||
mkdir common
|
||||
git mv *.go common
|
||||
git mv LICENSE common
|
||||
|
||||
git commit -m "move all files to common/ to begin repo merge"
|
||||
|
||||
for repo in "${REPOS[@]}"; do
|
||||
# add and fetch the repo
|
||||
git remote add -f "$repo" "https://github.com/tendermint/go-${repo}"
|
||||
|
||||
# merge master and move into subdir
|
||||
git merge "$repo/master" --no-edit
|
||||
|
||||
if [[ "$repo" != "flowrate" ]]; then
|
||||
mkdir "$repo"
|
||||
git mv *.go "$repo/"
|
||||
fi
|
||||
|
||||
set +e # these might not exist
|
||||
git mv *.md "$repo/"
|
||||
git mv README "$repo/README.md"
|
||||
git mv Makefile "$repo/Makefile"
|
||||
git rm LICENSE
|
||||
set -e
|
||||
|
||||
# commit
|
||||
git commit -m "merge go-${repo}"
|
||||
|
||||
git remote rm "$repo"
|
||||
done
|
||||
|
||||
go get github.com/ebuchman/got
|
||||
got replace "tendermint/go-common" "tendermint/go-common/common"
|
||||
for repo in "${REPOS[@]}"; do
|
||||
|
||||
if [[ "$repo" != "flowrate" ]]; then
|
||||
got replace "tendermint/go-${repo}" "tendermint/go-common/${repo}"
|
||||
else
|
||||
got replace "tendermint/go-${repo}/flowrate" "tendermint/go-common/flowrate"
|
||||
fi
|
||||
done
|
||||
|
||||
git add -u
|
||||
git commit -m "update import paths"
|
||||
|
||||
# TODO: change any paths in non-Go files
|
Loading…
x
Reference in New Issue
Block a user