Skip to content

Commit 2a12fb0

Browse files
feat: add new qdl binaries
Co-authored-by: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com>
1 parent e895332 commit 2a12fb0

13 files changed

+88
-28
lines changed

flash.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package main
22

33
import (
4-
"arduino-flasher/updater"
54
"context"
65
"os"
76
"runtime"
@@ -11,6 +10,8 @@ import (
1110
"github.com/bcmi-labs/orchestrator/cmd/feedback"
1211
"github.com/bcmi-labs/orchestrator/cmd/i18n"
1312
"github.com/spf13/cobra"
13+
14+
"arduino-flasher-cli/updater"
1415
)
1516

1617
func newFlashCmd() *cobra.Command {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module arduino-flasher
1+
module arduino-flasher-cli
22

33
go 1.25.1
44

updater/artifacts/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
resources_*/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package artifacts
2+
3+
import (
4+
_ "embed"
5+
)
6+
7+
//go:embed resources_darwin_amd64/qdl
8+
var QdlBinary []byte
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package artifacts
2+
3+
import (
4+
_ "embed"
5+
)
6+
7+
//go:embed resources_darwin_arm64/qdl
8+
var QdlBinary []byte
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package artifacts
2+
3+
import (
4+
_ "embed"
5+
)
6+
7+
//go:embed resources_linux_amd64/qdl
8+
var QdlBinary []byte
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package artifacts
2+
3+
import (
4+
_ "embed"
5+
)
6+
7+
//go:embed resources_linux_arm64/qdl
8+
var QdlBinary []byte
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package artifacts
2+
3+
import (
4+
_ "embed"
5+
)
6+
7+
//go:embed resources_windows_amd64/qdl.exe
8+
var QdlBinary []byte
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
6+
7+
REPO="arduino/qdl-packing"
8+
TAG="0.0.2-rc.9"
9+
10+
# Remove existing resource directories if they exist
11+
rm -rf $BASE_DIR/resources_*
12+
13+
# Download and extract Linux 64-bit
14+
mkdir -p "$BASE_DIR/resources_linux_amd64"
15+
gh release download "$TAG" --repo "$REPO" --pattern "qdl_*_Linux_64bit.tar.gz" --dir "$BASE_DIR/resources_linux_amd64"
16+
tar -xzf $BASE_DIR/resources_linux_amd64/qdl_*_Linux_64bit.tar.gz -C "$BASE_DIR/resources_linux_amd64" qdl
17+
18+
# Download and extract Linux arm64
19+
mkdir -p "$BASE_DIR/resources_linux_arm64"
20+
gh release download "$TAG" --repo "$REPO" --pattern "qdl_*_Linux_ARM64.tar.gz" --dir "$BASE_DIR/resources_linux_arm64"
21+
tar -xzf $BASE_DIR/resources_linux_arm64/qdl_*_Linux_ARM64.tar.gz -C "$BASE_DIR/resources_linux_arm64" qdl
22+
23+
# Download and extract Windows 32-bit
24+
mkdir -p "$BASE_DIR/resources_windows_amd64"
25+
gh release download "$TAG" --repo "$REPO" --pattern "qdl_*_Windows_32bit.tar.gz" --dir "$BASE_DIR/resources_windows_amd64"
26+
tar -xzf $BASE_DIR/resources_windows_amd64/qdl_*_Windows_32bit.tar.gz -C "$BASE_DIR/resources_windows_amd64" qdl.exe
27+
28+
# Download and extract macOS 64-bit
29+
mkdir -p "$BASE_DIR/resources_darwin_amd64"
30+
gh release download "$TAG" --repo "$REPO" --pattern "qdl_*_macOS_64bit.tar.gz" --dir "$BASE_DIR/resources_darwin_amd64"
31+
tar -xzf $BASE_DIR/resources_darwin_amd64/qdl_*_macOS_64bit.tar.gz -C "$BASE_DIR/resources_darwin_amd64" qdl
32+
33+
# Download and extract macOS arm64
34+
mkdir -p "$BASE_DIR/resources_darwin_arm64"
35+
gh release download "$TAG" --repo "$REPO" --pattern "qdl_*_macOS_arm64.tar.gz" --dir "$BASE_DIR/resources_darwin_arm64"
36+
tar -xzf $BASE_DIR/resources_darwin_arm64/qdl_*_macOS_arm64.tar.gz -C "$BASE_DIR/resources_darwin_arm64" qdl
37+
38+
# cleanup archive files
39+
rm -rf $BASE_DIR/resources_*/*.tar.gz
40+
41+
echo "All files downloaded, extracted, and organized successfully."

updater/assets/qdl_Darwin

-1.47 MB
Binary file not shown.

0 commit comments

Comments
 (0)