File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 80
80
repo-token : ${{ secrets.GITHUB_TOKEN }}
81
81
version : 3.x
82
82
83
+ - name : Download external files
84
+ run : |
85
+ task download-dfu-util
86
+ task download-libusb
87
+
83
88
- name : Check for errors
84
89
env :
85
90
GO_MODULE_PATH : ${{ matrix.module.path }}
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ dfu-discovery
5
5
* .o
6
6
dfu-util_ * .c
7
7
dist /
8
+ libusb.h
Original file line number Diff line number Diff line change 27
27
-X {{.CONFIGURATION_PACKAGE}}.Timestamp={{.TIMESTAMP}}
28
28
'
29
29
DFU_UTIL_VERSION : dfu-util-0.11
30
+ LIBUSB_VERSION : libusb-1.0.26
30
31
# Path of the project's primary Go module:
31
32
DEFAULT_GO_MODULE_PATH : ./
32
33
DEFAULT_GO_PACKAGES :
@@ -55,6 +56,19 @@ tasks:
55
56
# for some reason quirks.c has the exec flag set
56
57
chmod -x dfu-util_quirks.c
57
58
fi
59
+
60
+ download-libusb :
61
+ desc : download libusb and copy the files in the correct dir
62
+ cmds :
63
+ - |
64
+ if [ -d "{{.LIBUSB_VERSION}}" ];
65
+ then
66
+ echo "{{.LIBUSB_VERSION}} already downloaded (directory exists)."
67
+ else
68
+ echo "Downloading {{.LIBUSB_VERSION}}..."
69
+ curl -L https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2 -s | tar xj
70
+ cp {{.LIBUSB_VERSION}}/libusb/libusb.h .
71
+ fi
58
72
59
73
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-dependencies-task/Taskfile.yml
60
74
general:prepare-deps :
You can’t perform that action at this time.
0 commit comments