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.

29 lines
655 B

11 months ago
11 months ago
4 weeks 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. packetname=app-v$VERSION-aarm64
  12. packetpath=/tmp/$packetname
  13. rm -rf $packetpath
  14. mkdir -p $packetpath/
  15. cp ./build/app/* $packetpath/
  16. cp -rf html $packetpath/
  17. tar -czvf $packetpath.tar.gz -C /tmp/ $packetname
  18. mkdir -p ./release
  19. mv $packetpath.tar.gz ./release/
  20. echo "Release package is in ./release/$packetname.tar.gz"