Revision aed02357fa90a004ef00e6376b5dcc4f4d5ee2d7 authored by Romain Bardou on 18 November 2019, 13:11:31 UTC, committed by Benjamin Canou on 09 December 2019, 15:28:59 UTC
1 parent daa6518
apply_patch.sh
#! /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)
sed -i s/TEZOS/TEZOS_ZERONET/ ./src/lib_shell/distributed_db_message.ml
patch -p1 < scripts/alphanet_constants.patch
patch -p1 < scripts/zeronet.patch
if has_git; then git commit -a -m "Zeronet: change economic constants." --author "Tezos CI <null@tezos.com>"; fi
echo "Done"
;;
alphanet)
sed -i s/TEZOS/TEZOS_ALPHANET/ ./src/lib_shell/distributed_db_message.ml
patch -p1 < scripts/alphanet_constants.patch
if has_git; then git commit -a -m "Alphanet: change economic constants." --author "Tezos CI <null@tezos.com>"; fi
echo "Done"
;;
*)
echo "Noop"
esac
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...