Jump to content
  1. 乾坤堂易学综合区

  2. 神贴系列

最新话题

最新动态

  1. export GOPROXY=https://goproxy.cn,direct && cd /www/wwwroot/answer && /usr/local/go/bin/go run ./cmd/answer/main.go run -C ./answer-data
  2. 添加 Apache Answer 插件指南 | Answer
  3. 部署插件带版本号脚本 starp.sh #!/bin/bash # 项目根目录 APP_DIR="/www/wwwroot/answer" # 插件目录 PLUGIN="github.com/apache/answer-plugins/cdn-aliyun" # 设置版本信息 VERSION="1.5.1" REVISION=$(git -C "$APP_DIR" rev-parse --short HEAD) BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") cd "$APP_DIR" || exit 1 echo " 开始构建 Answer 插件:$PLUGIN" ./answer build --with "$PLUGIN" # 找到最新构建目录 BUILD_DIR=$(ls -td answer_build*/ | head -1) echo " 构建目录:$BUILD_DIR" cd "$BUILD_DIR" || exit 1 echo " 编译带版本信息的 Answer 可执行文件..." go build -ldflags "-X github.com/apache/answer/cmd.Version=$VERSION \ -X github.com/apache/answer/cmd.Revision=$REVISION \ -X github.com/apache/answer/cmd.Time=$BUILD_TIME" \ -o "$APP_DIR/answer" ./answer echo " 编译完成,输出路径:$APP_DIR/answer"
  4. 道之 posted a post in a topic in 茶馆/闲聊