Skip to content

Commit

Permalink
Merge branch 'floitsch/extract.10.refactor' into floitsch/extract.20.…
Browse files Browse the repository at this point in the history
…image
  • Loading branch information
floitsch committed Nov 8, 2024
2 parents 1a26c6b + b520664 commit 6edb69b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ jobs:
certificate-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
username: ${{ secrets.AC_USERNAME }}
password: ${{ secrets.AC_PASSWORD }}
apple-team-id: 33DS2ZRDST
apple-team-id: ${{ vars.MACOS_TEAM_ID}}
app-path: build/macos/jag

- name: Create a DMG
Expand All @@ -246,7 +246,7 @@ jobs:
certificate-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
username: ${{ secrets.AC_USERNAME }}
password: ${{ secrets.AC_PASSWORD }}
apple-team-id: 33DS2ZRDST
apple-team-id: ${{ vars.MACOS_TEAM_ID }}
app-path: build/macos/jag.dmg

- name: Create a ZIP
Expand Down
33 changes: 26 additions & 7 deletions cmd/jag/commands/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,36 @@ import (

func getToitSDKURL(version string) (string, error) {
currOS := runtime.GOOS
currARCH := runtime.GOARCH
selector := ""
if currOS == "darwin" {
currOS = "macos"
} else {
currARCH := runtime.GOARCH
if currARCH == "arm" {
currOS = "rpi"
if currARCH == "amd64" {
selector = "macos-x64"
} else if currARCH == "arm64" {
selector = "macos-aarch64"
} else {
return "", fmt.Errorf("unsupported architecture %s for macOS", currARCH)
}
} else if currOS == "linux" {
if currARCH == "amd64" {
selector = "linux-x64"
} else if currARCH == "arm" {
selector = "linux-armv7"
} else if currARCH == "arm64" {
currOS = "aarch64"
selector = "linux-aarch64"
} else {
return "", fmt.Errorf("unsupported architecture %s for Linux", currARCH)
}
} else if currOS == "windows" {
if currARCH == "amd64" {
selector = "windows-x64"
} else {
return "", fmt.Errorf("unsupported architecture %s for Windows", currARCH)
}
} else {
return "", fmt.Errorf("unsupported OS %s", currOS)
}
return fmt.Sprintf("https://github.com/toitlang/toit/releases/download/%s/toit-%s.tar.gz", version, currOS), nil
return fmt.Sprintf("https://github.com/toitlang/toit/releases/download/%s/toit-%s.tar.gz", version, selector), nil
}

func getAssetsURL(version string) string {
Expand Down
4 changes: 2 additions & 2 deletions cmd/jag/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
)

var (
version = "v1.43.1"
sdkVersion = "v2.0.0-alpha.163"
version = "v1.43.2"
sdkVersion = "v2.0.0-alpha.164"
)

var buildDate = "unknown"
Expand Down

0 comments on commit 6edb69b

Please sign in to comment.