kind: pipeline type: docker name: "Build apps" platform: os: linux arch: amd64 steps: - name: "Update submodules" image: alpine/git commands: - git submodule sync - git -c protocol.version=2 submodule update --init --force --recursive --jobs 4 - git submodule foreach git config --local gc.auto 0 - git log -1 --format='%H' - name: "Build base pack" image: hfdj/fztools pull: never commands: - git clone --branch dev https://github.com/DarkFlippers/unleashed-firmware.git - rm -rf unleashed-firmware/build/ - rm -rf unleashed-firmware/dist/ - rm -rf unleashed-firmware/.sconsign.dblite - mv base_pack/* unleashed-firmware/applications_user/ - ./parse_api_ver.sh - cd unleashed-firmware - export FBT_GIT_SUBMODULE_SHALLOW=1 - ./fbt COMPACT=1 DEBUG=0 updater_package - mkdir artifacts-base - mkdir artifacts-totp - mkdir dist/f7-C/f7-update-local/resources - tar xf dist/f7-C/f7-update-local/resources.tar -C dist/f7-C/f7-update-local/resources - mv dist/f7-C/f7-update-local/resources/apps/* artifacts-base/ - mv dist/f7-C/f7-update-local/resources/apps_data/totp/* artifacts-totp/ - ls -laS artifacts-base - ls -laS artifacts-totp - ls -laS artifacts-totp/plugins - rm -f artifacts-base/GPIO/gpio.fap - rm -f artifacts-base/iButton/ibutton.fap - rm -f artifacts-base/Infrared/infrared.fap - rm -f artifacts-base/NFC/nfc.fap - rm -f artifacts-base/RFID/lfrfid.fap - rm -f artifacts-base/Sub-GHz/subghz_remote.fap - rm -f artifacts-base/Tools/clock.fap - rm -f artifacts-base/USB/bad_usb.fap - rm -f artifacts-base/USB/u2f.fap - cd .. - mkdir base_pack_build - mv unleashed-firmware/artifacts-base/ base_pack_build - mkdir -p base_pack_build/apps_data/totp - mv unleashed-firmware/artifacts-totp/* base_pack_build/apps_data/totp/ environment: FBT_TOOLS_CUSTOM_LINK: from_secret: fbt_link - name: "Build extra apps" image: hfdj/fztools pull: never commands: - rm -rf unleashed-firmware/build/ - rm -rf unleashed-firmware/dist/ - rm -rf unleashed-firmware/.sconsign.dblite - rm -rf unleashed-firmware/applications_user/* - mv apps_source_code/* unleashed-firmware/applications_user/ - mv non_catalog_apps/* unleashed-firmware/applications_user/ - cd unleashed-firmware - export FBT_GIT_SUBMODULE_SHALLOW=1 - ./fbt COMPACT=1 DEBUG=0 updater_package - mkdir artifacts-extra - mkdir dist/f7-C/f7-update-local/resources - tar xf dist/f7-C/f7-update-local/resources.tar -C dist/f7-C/f7-update-local/resources - mv dist/f7-C/f7-update-local/resources/apps/* artifacts-extra/ - ls -laS artifacts-extra - rm -f artifacts-extra/GPIO/gpio.fap - rm -f artifacts-extra/iButton/ibutton.fap - rm -f artifacts-extra/Infrared/infrared.fap - rm -f artifacts-extra/NFC/nfc.fap - rm -f artifacts-extra/RFID/lfrfid.fap - rm -f artifacts-extra/Sub-GHz/subghz_remote.fap - rm -f artifacts-extra/Tools/clock.fap - rm -f artifacts-extra/USB/bad_usb.fap - rm -f artifacts-extra/USB/u2f.fap - cd .. - mkdir extra_pack_build - mv unleashed-firmware/artifacts-extra/ extra_pack_build environment: FBT_TOOLS_CUSTOM_LINK: from_secret: fbt_link - name: "Bundle packages" image: kramos/alpine-zip commands: - zip -r all-the-apps-extra.zip extra_pack_build - zip -r all-the-apps-base.zip base_pack_build - tar czpf all-the-apps-extra.tgz extra_pack_build - tar czpf all-the-apps-base.tgz base_pack_build - mkdir ${DRONE_TAG} - mv all-the-apps-extra.zip ${DRONE_TAG}/ - mv all-the-apps-base.zip ${DRONE_TAG}/ - mv all-the-apps-extra.tgz ${DRONE_TAG}/ - mv all-the-apps-base.tgz ${DRONE_TAG}/ - rm -rf extra_pack_build - rm -rf base_pack_build - rm -rf unleashed-firmware - ls -laS - ls -laS ${DRONE_TAG} - name: "Do Github release" image: ddplugins/github-release pull: never settings: github_url: https://github.com repo_owner: from_secret: github_repoowner api_key: from_secret: github_apikey files: - ${DRONE_TAG}/*.tgz - ${DRONE_TAG}/*.zip title: ${DRONE_TAG} note: CHANGELOG.md checksum: - md5 - sha1 - crc32 trigger: event: - tag node: typ: haupt