list_toolchain_updates_checks 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #!/bin/bash
  2. # ndkVersion
  3. read -d '' p << 'EOF' || true
  4. if (m/^\\s*ndkVersion:\\s"([^"]*)",/) {
  5. print $1;
  6. exit;
  7. }
  8. EOF
  9. needed=$(cat build.gradle | perl -ne "$p")
  10. current='[% pc("android-toolchain", "var/android_ndk_version_build") %]'
  11. check_update_needed ndkVersion "$needed" "$current"
  12. # compileSdkVersion
  13. read -d '' p << 'EOF' || true
  14. if (m/^\\s*compileSdkVersion:\\s([^"]*),/) {
  15. print $1;
  16. exit;
  17. }
  18. EOF
  19. needed=$(cat build.gradle | perl -ne "$p")
  20. current=29
  21. check_update_needed compileSdkVersion "$needed" "$current"
  22. # minSdkVersion
  23. read -d '' p << 'EOF' || true
  24. if (m/^\\s*minSdkVersion:\\s([^"]*),/) {
  25. print $1;
  26. exit;
  27. }
  28. EOF
  29. needed=$(cat build.gradle | perl -ne "$p")
  30. current=21
  31. check_update_needed minSdkVersion "$needed" "$current"
  32. # glean_parser
  33. read -d '' p << 'EOF' || true
  34. if (m/^\\s*"glean_parser==([^"]+)",/) {
  35. print $1;
  36. exit;
  37. }
  38. EOF
  39. tar xf $rootdir/[% c('input_files_by_name/glean') %]
  40. needed=$(cat glean-[% c("var/glean_version") %]/glean-core/python/setup.py | perl -ne "$p")
  41. current='[% c("var/glean_parser") %]'
  42. check_update_needed glean_parser "$needed" "$current"
  43. # gradle
  44. read -d '' p << 'EOF' || true
  45. if (m|distributionUrl=https\\\\://services.gradle.org/distributions/gradle-(.*)-.*.zip|) {
  46. print $1;
  47. exit;
  48. }
  49. EOF
  50. needed=$(cat gradle/wrapper/gradle-wrapper.properties | perl -ne "$p")
  51. current='[% c("var/gradle_version") %]'
  52. check_update_needed gradle "$needed" "$current"
  53. # nss-nspr
  54. read -d '' p << 'EOF' || true
  55. if (m/NSS_ARCHIVE="nss-(.*-with-nspr-.*)\\.tar\\.gz"/) {
  56. print $1;
  57. exit;
  58. }
  59. EOF
  60. needed=$(cat libs/build-all.sh | perl -ne "$p")
  61. current='[% pc("nss", "version") %]-with-nspr-[% pc("nss", "nspr_version") %]'
  62. check_update_needed nss-nspr "$needed" "$current"
  63. # sqlcipher
  64. read -d '' p << 'EOF' || true
  65. if (m/SQLCIPHER_VERSION="([^"]+)"/) {
  66. print $1;
  67. exit;
  68. }
  69. EOF
  70. needed=$(cat libs/build-all.sh | perl -ne "$p")
  71. current='[% pc("sqlcipher", "version") %]'
  72. check_update_needed sqlcipher "$needed" "$current"
  73. # android-gradle-plugin
  74. read -d '' p << 'EOF' || true
  75. if (m/^\\s*android_gradle_plugin_version\\s=\\s'([^']*)'/) {
  76. print $1;
  77. exit;
  78. }
  79. EOF
  80. needed=$(cat build.gradle | perl -ne "$p")
  81. current='4.2.2'
  82. check_update_needed android-gradle-plugin "$needed" "$current"