forked from xMasterX/all-the-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
140 lines (132 loc) · 4.76 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
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
- rm -f artifacts-extra/Games/snake.fap
- rm -f artifacts-extra/USB/hid_usb.fap
- rm -f artifacts-extra/Bluetooth/hid_ble.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
- rm -f artifacts-extra/Games/snake.fap
- rm -f artifacts-extra/USB/hid_usb.fap
- rm -f artifacts-extra/Bluetooth/hid_ble.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