.drone.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. kind: pipeline
  2. type: docker
  3. name: "Build apps"
  4. platform:
  5. os: linux
  6. arch: amd64
  7. steps:
  8. - name: "Update submodules"
  9. image: alpine/git
  10. commands:
  11. - git submodule sync
  12. - git -c protocol.version=2 submodule update --init --force --recursive --jobs 4
  13. - git submodule foreach git config --local gc.auto 0
  14. - git log -1 --format='%H'
  15. - name: "Build base pack"
  16. image: hfdj/fztools
  17. pull: never
  18. commands:
  19. - git clone --branch dev https://github.com/DarkFlippers/unleashed-firmware.git
  20. - rm -rf unleashed-firmware/assets/resources/apps/
  21. - rm -rf unleashed-firmware/build/
  22. - rm -rf unleashed-firmware/dist/
  23. - rm -rf unleashed-firmware/.sconsign.dblite
  24. - mv base_pack/* unleashed-firmware/applications_user/
  25. - ./parse_api_ver.sh
  26. - cd unleashed-firmware
  27. - export FBT_GIT_SUBMODULE_SHALLOW=1
  28. - ./fbt COMPACT=1 DEBUG=0 updater_package
  29. - mkdir artifacts-base
  30. - mkdir artifacts-totp
  31. - mv assets/resources/apps/* artifacts-base/
  32. - mv assets/resources/apps_data/totp/* artifacts-totp/
  33. - ls -laS artifacts-base
  34. - ls -laS artifacts-totp
  35. - ls -laS artifacts-totp/plugins
  36. - rm -f artifacts-base/GPIO/gpio.fap
  37. - rm -f artifacts-base/iButton/ibutton.fap
  38. - rm -f artifacts-base/Infrared/infrared.fap
  39. - rm -f artifacts-base/NFC/nfc.fap
  40. - rm -f artifacts-base/RFID/lfrfid.fap
  41. - rm -f artifacts-base/Sub-GHz/subghz_remote.fap
  42. - rm -f artifacts-base/Tools/clock.fap
  43. - rm -f artifacts-base/USB/bad_usb.fap
  44. - rm -f artifacts-base/USB/u2f.fap
  45. - cd ..
  46. - mkdir base_pack_build
  47. - mv unleashed-firmware/artifacts-base/ base_pack_build
  48. - mkdir -p base_pack_build/apps_data/totp
  49. - mv unleashed-firmware/artifacts-totp/* base_pack_build/apps_data/totp/
  50. environment:
  51. FBT_TOOLS_CUSTOM_LINK:
  52. from_secret: fbt_link
  53. - name: "Build extra apps"
  54. image: hfdj/fztools
  55. pull: never
  56. commands:
  57. - rm -rf unleashed-firmware/assets/resources/apps/
  58. - rm -rf unleashed-firmware/build/
  59. - rm -rf unleashed-firmware/dist/
  60. - rm -rf unleashed-firmware/.sconsign.dblite
  61. - rm -rf unleashed-firmware/applications_user/*
  62. - mv apps_source_code/* unleashed-firmware/applications_user/
  63. - mv non_catalog_apps/* unleashed-firmware/applications_user/
  64. - cd unleashed-firmware
  65. - export FBT_GIT_SUBMODULE_SHALLOW=1
  66. - ./fbt COMPACT=1 DEBUG=0 updater_package
  67. - mkdir artifacts-extra
  68. - mv assets/resources/apps/* artifacts-extra/
  69. - ls -laS artifacts-extra
  70. - rm -f artifacts-extra/GPIO/gpio.fap
  71. - rm -f artifacts-extra/iButton/ibutton.fap
  72. - rm -f artifacts-extra/Infrared/infrared.fap
  73. - rm -f artifacts-extra/NFC/nfc.fap
  74. - rm -f artifacts-extra/RFID/lfrfid.fap
  75. - rm -f artifacts-extra/Sub-GHz/subghz_remote.fap
  76. - rm -f artifacts-extra/Tools/clock.fap
  77. - rm -f artifacts-extra/USB/bad_usb.fap
  78. - rm -f artifacts-extra/USB/u2f.fap
  79. - cd ..
  80. - mkdir extra_pack_build
  81. - mv unleashed-firmware/artifacts-extra/ extra_pack_build
  82. environment:
  83. FBT_TOOLS_CUSTOM_LINK:
  84. from_secret: fbt_link
  85. - name: "Bundle packages"
  86. image: kramos/alpine-zip
  87. commands:
  88. - zip -r all-the-apps-extra.zip extra_pack_build
  89. - zip -r all-the-apps-base.zip base_pack_build
  90. - tar czpf all-the-apps-extra.tgz extra_pack_build
  91. - tar czpf all-the-apps-base.tgz base_pack_build
  92. - mkdir ${DRONE_TAG}
  93. - mv all-the-apps-extra.zip ${DRONE_TAG}/
  94. - mv all-the-apps-base.zip ${DRONE_TAG}/
  95. - mv all-the-apps-extra.tgz ${DRONE_TAG}/
  96. - mv all-the-apps-base.tgz ${DRONE_TAG}/
  97. - rm -rf extra_pack_build
  98. - rm -rf base_pack_build
  99. - rm -rf unleashed-firmware
  100. - ls -laS
  101. - ls -laS ${DRONE_TAG}
  102. - name: "Do Github release"
  103. image: ddplugins/github-release
  104. pull: never
  105. settings:
  106. github_url: https://github.com
  107. repo_owner:
  108. from_secret: github_repoowner
  109. api_key:
  110. from_secret: github_apikey
  111. files:
  112. - ${DRONE_TAG}/*.tgz
  113. - ${DRONE_TAG}/*.zip
  114. title: ${DRONE_TAG}
  115. note: CHANGELOG.md
  116. checksum:
  117. - md5
  118. - sha1
  119. - crc32
  120. trigger:
  121. event:
  122. - tag
  123. node:
  124. typ: haupt