automake_agx.sh 938 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. folder=$(echo $PWD) ;
  2. filepath=$folder/../../.git/refs/heads/master;
  3. while true
  4. do
  5. cd ../../
  6. git pull
  7. cd ./sh/automake
  8. VERSIONCODE=$(cat $folder/../../../modularization_exe/agx/appversion.md)
  9. echo "app version: "$VERSIONCODE
  10. GITVERSIONCODE="unknown"
  11. if [ -f "$filepath" ]; then
  12. gitversion=$(cat $folder/../../.git/refs/heads/master)
  13. # echo $gitversion
  14. GITVERSIONCODE=$gitversion
  15. fi
  16. echo "code version: "$GITVERSIONCODE
  17. if [ "$GITVERSIONCODE" = "$VERSIONCODE" ]; then
  18. sleep 1s
  19. else
  20. VERSIONCODE=$GITVERSIONCODE
  21. ./autogen.sh
  22. ./autodeploy.sh
  23. cd ../../deploy
  24. zip -r app.zip app
  25. cd ../../modularization_exe
  26. git pull
  27. cd ../modularization/deploy
  28. cp app.zip ../../modularization_exe/agx
  29. cd ../../modularization_exe/agx
  30. cat /dev/null > appversion.md
  31. echo "$VERSIONCODE" >> appversion.md
  32. cd ..
  33. git add -u
  34. git commit -m "automake change app.zip"
  35. git push
  36. cd ../modularization/sh/automake
  37. fi
  38. sleep 10m
  39. done