.drone.yml 3.9 KB

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