Zeronet: check constant patch application.
This commit is contained in:
parent
d00724ea13
commit
ee3f81b6e3
@ -5,6 +5,7 @@ variables:
|
||||
public_docker_image: docker.io/${CI_PROJECT_PATH}
|
||||
|
||||
stages:
|
||||
- precheck
|
||||
- prepare
|
||||
- build_deps
|
||||
- build
|
||||
@ -14,6 +15,17 @@ stages:
|
||||
- deploy
|
||||
- cleanup
|
||||
|
||||
## Check zeronet/alphanet
|
||||
|
||||
precheck:constant:
|
||||
image: ${opam_image}
|
||||
stage: precheck
|
||||
only:
|
||||
- zeronet
|
||||
- alphanet
|
||||
script:
|
||||
- ./scripts/check_patch.sh "${CI_COMMIT_REF_NAME}"
|
||||
|
||||
## Template for `docker_in_docker` jobs
|
||||
|
||||
.dind_template: &dind_definition
|
||||
@ -56,7 +68,6 @@ build_deps:
|
||||
.build_deps_template: &build_deps_definition
|
||||
image: ${build_deps_image}:${CI_COMMIT_SHA}
|
||||
before_script:
|
||||
- ./scripts/apply_patch.sh "${CI_COMMIT_REF_NAME}"
|
||||
- opam list
|
||||
tags:
|
||||
- gitlab-org
|
||||
@ -456,7 +467,6 @@ publish:docker:minimal:
|
||||
- alphanet
|
||||
- zeronet
|
||||
script:
|
||||
- ./scripts/apply_patch.sh "${CI_COMMIT_REF_NAME}" ;
|
||||
- ./scripts/ci/create_docker_image.build.sh
|
||||
"tezos_build" "${CI_COMMIT_REF_NAME}"
|
||||
"${build_deps_image}:${CI_COMMIT_SHA}"
|
||||
@ -481,7 +491,6 @@ publish:github:
|
||||
- echo "${CI_PK_GITHUB}" > ~/.ssh/id_rsa
|
||||
- chmod 400 ~/.ssh/id_rsa
|
||||
- rm -fr .git/refs/original
|
||||
- ./scripts/apply_patch.sh "${CI_COMMIT_REF_NAME}" ;
|
||||
- sudo apk add --no-cache openssh
|
||||
- git push git@github.com:tezos/tezos.git -f HEAD:${CI_COMMIT_REF_NAME}
|
||||
tags:
|
||||
|
@ -21,13 +21,13 @@ case "$branch" in
|
||||
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: DO NOT MERGE" --author "Tezos CI <null@tezos.com>"; fi
|
||||
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: DO NOT MERGE" --author "Tezos CI <null@tezos.com>"; fi
|
||||
if has_git; then git commit -a -m "Alphanet: change economic constants." --author "Tezos CI <null@tezos.com>"; fi
|
||||
echo "Done"
|
||||
;;
|
||||
*)
|
||||
|
22
scripts/check_patch.sh
Executable file
22
scripts/check_patch.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ $1 != "zeronet" ] && [ $1 != "alphanet" ] ; then
|
||||
echo Ignored
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if git log | grep "net: change economic constants" >/dev/null 2>&1 ; then
|
||||
echo OK
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
|
||||
The branch $1 should include the constant patch.
|
||||
Please run './scripts/apply-patch.sh $1'.
|
||||
|
||||
EOF
|
||||
|
||||
exit 1
|
Loading…
Reference in New Issue
Block a user