list_toolchain_updates_checks 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #!/bin/bash
  2. # compileSdkVersion
  3. read -d '' p << 'EOF' || true
  4. if (m/compileSdkVersion:\\s+(.*)$/) {
  5. print $1;
  6. exit;
  7. }
  8. EOF
  9. needed=$(cat .config.yml | perl -ne "$p")
  10. current=31
  11. check_update_needed compileSdkVersion "$needed" "$current"
  12. # targetSdkVersion
  13. read -d '' p << 'EOF' || true
  14. if (m/targetSdkVersion:\\s+(.*)$/) {
  15. print $1;
  16. exit;
  17. }
  18. EOF
  19. needed=$(cat .config.yml | perl -ne "$p")
  20. current=30
  21. check_update_needed targetSdkVersion "$needed" "$current"
  22. # minSdkVersion
  23. read -d '' p << 'EOF' || true
  24. if (m/minSdkVersion:\\s+(.*)$/) {
  25. print $1;
  26. exit;
  27. }
  28. EOF
  29. needed=$(cat .config.yml | perl -ne "$p")
  30. current=21
  31. check_update_needed minSdkVersion "$needed" "$current"
  32. # application-services
  33. read -d '' p << 'EOF' || true
  34. if (m/const\\sval\\smozilla_appservices\\s=\\s"([^"]+)"/) {
  35. print $1;
  36. exit;
  37. }
  38. EOF
  39. needed=$(cat buildSrc/src/main/java/Dependencies.kt | perl -ne "$p")
  40. current='[% pc("application-services", "version") %]'
  41. check_update_needed application-services "$needed" "$current"
  42. # glean_parser
  43. read -d '' p << 'EOF' || true
  44. if (m/^\\s*"glean_parser==([^"]+)",/) {
  45. print $1;
  46. exit;
  47. }
  48. EOF
  49. tar xf $rootdir/[% c('input_files_by_name/glean') %]
  50. needed=$(cat glean-[% c("var/glean_version") %]/glean-core/python/setup.py | perl -ne "$p")
  51. current='[% c("var/glean_parser") %]'
  52. check_update_needed glean_parser "$needed" "$current"
  53. # gradle
  54. read -d '' p << 'EOF' || true
  55. if (m|distributionUrl=https\\\\://services.gradle.org/distributions/gradle-(.*)-bin.zip|) {
  56. print $1;
  57. exit;
  58. }
  59. EOF
  60. needed=$(cat gradle/wrapper/gradle-wrapper.properties | perl -ne "$p")
  61. current='[% c("var/gradle_version") %]'
  62. check_update_needed gradle "$needed" "$current"
  63. # android-gradle-plugin
  64. read -d '' p << 'EOF' || true
  65. if (m/const\\s+val\\s+android_gradle_plugin\\s+=\\s+"([^"]+)"/) {
  66. print $1;
  67. exit;
  68. }
  69. EOF
  70. needed=$(cat buildSrc/src/main/java/Dependencies.kt | perl -ne "$p")
  71. current='7.0.0'
  72. check_update_needed android-gradle-plugin "$needed" "$current"