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.

23 lines
619 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. ./
  9. ./build.sh
  10. aarch64-linux-gnu-strip ./build/app/*
  11. mkdir -p /tmp/app/
  12. rm -rf /tmp/app/*
  13. cp ./build/app/* /tmp/app/
  14. cp -rf html /tmp/app/
  15. tar -czvf /tmp/app.tar.gz -C /tmp app
  16. rm -rf /tmp/app
  17. mv /tmp/app.tar.gz /tmp/app_v$VERSION.tar.gz
  18. mv /tmp/app_v$VERSION.tar.gz ./release/
  19. echo "Release package is in ./release/app_v$VERSION.tar.gz"