.drone.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. - ./fbt COMPACT=1 DEBUG=0 updater_package
  28. - mkdir artifacts-base
  29. - mkdir artifacts-totp
  30. - mv assets/resources/apps/* artifacts-base/
  31. - mv assets/resources/apps_data/totp/* artifacts-totp/
  32. - ls -laS artifacts-base
  33. - ls -laS artifacts-totp
  34. - ls -laS artifacts-totp/plugins
  35. - rm -f artifacts-base/GPIO/gpio.fap
  36. - rm -f artifacts-base/iButton/ibutton.fap
  37. - rm -f artifacts-base/Infrared/infrared.fap
  38. - rm -f artifacts-base/NFC/nfc.fap
  39. - rm -f artifacts-base/RFID/lfrfid.fap
  40. - rm -f artifacts-base/Sub-GHz/subghz_remote.fap
  41. - rm -f artifacts-base/Tools/clock.fap
  42. - rm -f artifacts-base/USB/bad_usb.fap
  43. - rm -f artifacts-base/USB/u2f.fap
  44. - cd ..
  45. - mkdir base_pack_build
  46. - mv unleashed-firmware/artifacts-base/ base_pack_build
  47. - mkdir -p base_pack_build/apps_data/totp
  48. - mv unleashed-firmware/artifacts-totp/* base_pack_build/apps_data/totp/
  49. environment:
  50. FBT_TOOLS_CUSTOM_LINK:
  51. from_secret: fbt_link
  52. - name: "Build extra apps"
  53. image: hfdj/fztools
  54. pull: never
  55. commands:
  56. - rm -rf unleashed-firmware/assets/resources/apps/
  57. - rm -rf unleashed-firmware/build/
  58. - rm -rf unleashed-firmware/dist/
  59. - rm -rf unleashed-firmware/.sconsign.dblite
  60. - rm -rf unleashed-firmware/applications_user/*
  61. - mv apps_source_code/* unleashed-firmware/applications_user/
  62. - mv non_catalog_apps/* unleashed-firmware/applications_user/
  63. - cd unleashed-firmware
  64. - ./fbt COMPACT=1 DEBUG=0 updater_package
  65. - mkdir artifacts-extra
  66. - mv assets/resources/apps/* artifacts-extra/
  67. - ls -laS artifacts-extra
  68. - rm -f artifacts-extra/GPIO/gpio.fap
  69. - rm -f artifacts-extra/iButton/ibutton.fap
  70. - rm -f artifacts-extra/Infrared/infrared.fap
  71. - rm -f artifacts-extra/NFC/nfc.fap
  72. - rm -f artifacts-extra/RFID/lfrfid.fap
  73. - rm -f artifacts-extra/Sub-GHz/subghz_remote.fap
  74. - rm -f artifacts-extra/Tools/clock.fap
  75. - rm -f artifacts-extra/USB/bad_usb.fap
  76. - rm -f artifacts-extra/USB/u2f.fap
  77. - cd ..
  78. - mkdir extra_pack_build
  79. - mv unleashed-firmware/artifacts-extra/ extra_pack_build
  80. environment:
  81. FBT_TOOLS_CUSTOM_LINK:
  82. from_secret: fbt_link
  83. - name: "Bundle packages"
  84. image: kramos/alpine-zip
  85. commands:
  86. - zip -r all-the-apps-extra.zip extra_pack_build
  87. - zip -r all-the-apps-base.zip base_pack_build
  88. - tar czpf all-the-apps-extra.tgz extra_pack_build
  89. - tar czpf all-the-apps-base.tgz base_pack_build
  90. - mkdir ${DRONE_TAG}
  91. - mv all-the-apps-extra.zip ${DRONE_TAG}/
  92. - mv all-the-apps-base.zip ${DRONE_TAG}/
  93. - mv all-the-apps-extra.tgz ${DRONE_TAG}/
  94. - mv all-the-apps-base.tgz ${DRONE_TAG}/
  95. - rm -rf extra_pack_build
  96. - rm -rf base_pack_build
  97. - rm -rf unleashed-firmware
  98. - ls -laS
  99. - ls -laS ${DRONE_TAG}
  100. - name: "Do Github release"
  101. image: ddplugins/github-release
  102. pull: never
  103. settings:
  104. github_url: https://github.com
  105. repo_owner:
  106. from_secret: github_repoowner
  107. api_key:
  108. from_secret: github_apikey
  109. files:
  110. - ${DRONE_TAG}/*.tgz
  111. - ${DRONE_TAG}/*.zip
  112. title: ${DRONE_TAG}
  113. note: CHANGELOG.md
  114. checksum:
  115. - md5
  116. - sha1
  117. - crc32
  118. trigger:
  119. event:
  120. - tag
  121. node:
  122. typ: haupt