2017-08-04 20:32:52 +04:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
|
|
|
|
cd "$script_dir"/..
|
|
|
|
|
|
|
|
branch=$1
|
|
|
|
has_git() {
|
|
|
|
which git && [ -d .git ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if has_git && ! [ -z "$(git status -s)" ] ; then
|
|
|
|
echo "This script cannot be applied within a dirty git directory,"
|
|
|
|
echo "you need 'stash' or 'commit' your changes before."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
case "$branch" in
|
|
|
|
zeronet)
|
2017-12-13 17:36:14 +04:00
|
|
|
sed -i s/TEZOS/TEZOS_ZERONET/ ./lib_node_shell/distributed_db_message.ml
|
2017-08-04 20:32:52 +04:00
|
|
|
patch -p1 < scripts/alphanet_constants.patch
|
|
|
|
patch -p1 < scripts/zeronet.patch
|
2017-08-10 20:08:58 +04:00
|
|
|
cp README.md docs/README.master
|
|
|
|
cp docs/README.zeronet README.md
|
2017-09-22 19:46:50 +04:00
|
|
|
if has_git; then git add docs/README.master; git commit -a -m "Zeronet: DO NOT MERGE" --author "Tezos CI <null@tezos.com>"; fi
|
2017-08-04 20:32:52 +04:00
|
|
|
echo "Done"
|
|
|
|
;;
|
|
|
|
alphanet)
|
2017-12-13 17:36:14 +04:00
|
|
|
sed -i s/TEZOS/TEZOS_ALPHANET/ ./lib_node_shell/distributed_db_message.ml
|
2017-08-04 20:32:52 +04:00
|
|
|
patch -p1 < scripts/alphanet_constants.patch
|
2017-08-10 20:08:58 +04:00
|
|
|
cp README.md docs/README.master
|
|
|
|
cp docs/README.alphanet README.md
|
2017-09-22 19:46:50 +04:00
|
|
|
if has_git; then git add docs/README.master; git commit -a -m "Alphanet: DO NOT MERGE" --author "Tezos CI <null@tezos.com>"; fi
|
2017-08-04 20:32:52 +04:00
|
|
|
echo "Done"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Noop"
|
|
|
|
esac
|