jeffreys-cat commented on code in PR #829: URL: https://github.com/apache/doris-website/pull/829#discussion_r1667866970
########## scripts/merge_by_toc.py: ########## @@ -0,0 +1,157 @@ +#!/usr/bin/env python3 +# coding: utf8 +# +# Generate all-in-one Markdown file for `doc-cn` +# Tip: 不支持中文文件名 +# readme.md 中的目录引用的md多次(或者md的sub heading),以第一次出现为主 Review Comment: Delete Chinese ########## scripts/update.sh: ########## @@ -0,0 +1,57 @@ +#!/bin/bash + +set -e + +# Use current path for building and installing TiDB. +TIDB_PATH=`pwd` +echo "updating and building TiDB components in $TIDB_PATH" + +# All the binaries are installed in the `bin` directory. +mkdir -p $TIDB_PATH/bin + +# Assume we install go in /usr/local/go +export PATH=$PATH:/usr/local/go/bin + +echo "checking if go is installed" +# Go is required +go version +# The output might be like: go version go1.6 darwin/amd64 + +echo "checking if rust is installed" +# Rust nightly is required +rustc -V +# The output might be like: rustc 1.12.0-nightly (7ad125c4e 2016-07-11) + +# Set the GOPATH correctly. +export GOPATH=$TIDB_PATH/deps/go + +# Build TiDB +echo "updating and building TiDB..." +cd $GOPATH/src/github.com/pingcap/tidb +git pull + +make +cp -f ./bin/tidb-server $TIDB_PATH/bin +cd $TIDB_PATH +echo "TiDB is built" + Review Comment: $TIDB, these should not be here ########## scripts/upload.py: ########## @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +#-*- coding:utf-8 -*- + +import sys +import os +from qiniu import Auth, put_file, etag, urlsafe_base64_encode +import qiniu.config +from qiniu.compat import is_py2, is_py3 + +import logging +import boto3 +from botocore.exceptions import ClientError + +QINIU_ACCESS_KEY = os.getenv('QINIU_ACCESS_KEY') +QINIU_SECRET_KEY = os.getenv('QINIU_SECRET_KEY') +QINIU_BUCKET_NAME = os.getenv('QINIU_BUCKET_NAME') +AWS_BUCKET_NAME = os.getenv('AWS_BUCKET_NAME') + +assert(QINIU_ACCESS_KEY and QINIU_SECRET_KEY and QINIU_BUCKET_NAME) + +def progress_handler(progress, total): + print("{}/{} {:.2f}".format(progress, total, progress/total*100)) + +# local_file: local file path +# remote_name: 上传到七牛后保存的文件名 +def upload_to_qiniu(local_file, remote_name, ttl=3600): + print('uploading to qiniu', local_file, remote_name, ttl) + #构建鉴权对象 + q = Auth(QINIU_ACCESS_KEY, QINIU_SECRET_KEY) Review Comment: We don't have QINIU-ACCESS_KEY and QINIU-SECRET_KEY. We are uploading the issue using Alibaba Cloud -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org For additional commands, e-mail: dev-h...@doris.apache.org