You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
611 B

11 months ago
11 months ago
11 months ago
  1. #!/bin/bash
  2. # 定义文件路径
  3. file="appsrc/appconfig/basic/zappversion.hpp"
  4. # 提取 VERSION 字符串,处理多个空格的情况
  5. VERSION=$(grep -oP '#define VERSION\s*"\s*(\S+)\s*"' "$file" | sed 's/#define VERSION\s*"//;s/"//')
  6. # 输出 VERSION
  7. echo "VERSION: $VERSION"
  8. ./build.sh
  9. aarch64-linux-gnu-strip ./build/app/*
  10. mkdir -p /tmp/app/
  11. rm -rf /tmp/app/*
  12. cp ./build/app/* /tmp/app/
  13. cp -rf html /tmp/app/
  14. tar -czvf /tmp/app.tar.gz -C /tmp app
  15. rm -rf /tmp/app
  16. mv /tmp/app.tar.gz /tmp/app_v$VERSION.tar.gz
  17. echo "Release package is in /tmp/app_v$VERSION.tar.gz"
  18. mv /tmp/app_v$VERSION.tar.gz ./release/