Skip to content

Instantly share code, notes, and snippets.

@bopjiang
Created September 26, 2018 00:42
Show Gist options
  • Save bopjiang/dc37da8e6aa46238a4670b2bfa231171 to your computer and use it in GitHub Desktop.
Save bopjiang/dc37da8e6aa46238a4670b2bfa231171 to your computer and use it in GitHub Desktop.
#!/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