Created
September 26, 2018 00:42
-
-
Save bopjiang/dc37da8e6aa46238a4670b2bfa231171 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## exit when any error | |
## set -e | |
TIDB_CONTAINER_NAME=tidb-docker-compose_tidb_1 | |
GOOS=linux GOARCH=amd64 make server || { printf "\e[31m!!! build failed !!!\e[0m\n"; exit 1; } | |
printf "\e[38;5;82mTiDB version before:\n\e[0m" | |
docker exec -it $TIDB_CONTAINER_NAME /tidb-server -V | |
docker cp bin/tidb-server $TIDB_CONTAINER_NAME:/tidb-server | |
docker restart $TIDB_CONTAINER_NAME | |
printf "\e[38;5;82mTiDB version now\n\e[0m" | |
docker exec -it $TIDB_CONTAINER_NAME /tidb-server -V |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment