automake_agx.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. folder=$(echo $PWD) ;
  2. filepath=$folder/../../.git/refs/heads/master;
  3. function CreateFolder()
  4. {
  5. folderdir=$1
  6. mkdir $folderdir
  7. # cd $folderdir
  8. # cp ../../template/index.html ./
  9. # cd ..
  10. }
  11. while true
  12. do
  13. cd ../../
  14. git pull
  15. cd ./sh/automake
  16. VERSIONCODE=$(cat $folder/../../../modularization_exe/agx/appversion)
  17. echo "app version: "$VERSIONCODE
  18. GITVERSIONCODE="unknown"
  19. if [ -f "$filepath" ]; then
  20. gitversion=$(cat $folder/../../.git/refs/heads/master)
  21. # echo $gitversion
  22. GITVERSIONCODE=$gitversion
  23. fi
  24. echo "code version: "$GITVERSIONCODE
  25. if [ "$GITVERSIONCODE" = "$VERSIONCODE" ]; then
  26. sleep 1s
  27. else
  28. VERSIONCODE=$GITVERSIONCODE
  29. ./autogen.sh
  30. cd ../../
  31. zip -r pilotbin.zip pilotbin
  32. cd ../modularization_exe
  33. git pull
  34. cd ../modularization
  35. cp pilotbin.zip ../modularization_exe/agx/$GITVERSIONCODE.zip
  36. cd ../modularization_exe/agx
  37. cat /dev/null > appversion
  38. echo "$VERSIONCODE" >> appversion
  39. compiletime=`date "+%Y.%m.%d %H:%M:%S"`
  40. cat /dev/null > Readme.md
  41. echo " " > Readme.md
  42. sed -i "1 a\ Build Time : $compiletime \n\n" Readme.md
  43. # sed -i "1 a\ Version : $VERSIONCODE \n\n" Readme.md
  44. sed -i "1 a\ 最新版本APP : [下载]($urllink/AGXXavier/$month/$GITVERSIONCODE.zip) \n\n" Readme.md
  45. cd ..
  46. git add -u
  47. git commit -m "automake change app. code version:$VERSIONCODE"
  48. git push
  49. cd ../modularization/sh/automake
  50. fi
  51. sleep 10m
  52. done