diff options
Diffstat (limited to 'build-tezos.sh')
-rw-r--r-- | build-tezos.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/build-tezos.sh b/build-tezos.sh new file mode 100644 index 000000000000..900b2ebd8f50 --- /dev/null +++ b/build-tezos.sh @@ -0,0 +1,25 @@ +#! /usr/bin/env bash + +# SPDX-FileCopyrightText: 2020 TQ Tezos <https://tqtezos.com/> +# +# SPDX-License-Identifier: LicenseRef-MIT-TQ + +# This script builds static tezos binaries. It expects patches required for static building to be +# in parent directory, it also accepts tezos version as an argument. +set -euo pipefail + +tezos_version="$1" +git clone --single-branch --branch "$tezos_version" https://gitlab.com/tezos/tezos.git --depth 1 +cd tezos + +git apply ../static.patch +export OPAMYES="true" +wget https://sh.rustup.rs/rustup-init.sh +chmod +x rustup-init.sh +./rustup-init.sh --profile minimal --default-toolchain 1.52.1 -y +source "$HOME/.cargo/env" + +opam init --bare --disable-sandboxing +make build-deps +eval "$(opam env)" && PROFILE="static" make build && make build-sandbox +chmod +w tezos-* |