Skip to content

Commit

Permalink
fix image and add arm
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Aug 6, 2022
1 parent 0443f2a commit bdc60b3
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ builds:
goarch:
- "386"
- amd64
- arm
- arm64
archives:
- replacements:
darwin: macosx
Expand Down
1 change: 0 additions & 1 deletion cmd/app/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ var uninstallCmd = &cobra.Command{
if device == nil {
os.Exit(0)
}
util.CheckMount(device)
errUninstall := device.AppUninstall(bundleId)
if errUninstall != nil {
fmt.Println("uninstall failed")
Expand Down
2 changes: 2 additions & 0 deletions cmd/location/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package location

import (
"fmt"
"github.com/SonicCloudOrg/sonic-ios-bridge/src/util"
giDevice "github.com/electricbubble/gidevice"
"os"
Expand All @@ -37,6 +38,7 @@ var locationSetCmd = &cobra.Command{
if err != nil {
return util.NewErrorPrint(util.ErrSendCommand, "location set", err)
}
fmt.Println("location set successful!")
return nil
},
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/location/unset.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package location

import (
"fmt"
"github.com/SonicCloudOrg/sonic-ios-bridge/src/util"
"os"

Expand All @@ -36,6 +37,7 @@ var locationUnsetCmd = &cobra.Command{
if err != nil {
return util.NewErrorPrint(util.ErrSendCommand, "location unset", err)
}
fmt.Println("location unset successful!")
return nil
},
}
Expand Down
1 change: 0 additions & 1 deletion cmd/run/wda.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ var wdaCmd = &cobra.Command{
testEnv := make(map[string]interface{})
testEnv["USE_PORT"] = serverRemotePort
testEnv["MJPEG_SERVER_PORT"] = mjpegRemotePort
util.CheckMount(device)
output, stopTest, err2 := device.XCTest(wdaBundleID, giDevice.WithXCTestEnv(testEnv))
if err2 != nil {
fmt.Printf("WebDriverAgent server start failed: %s", err2)
Expand Down
2 changes: 0 additions & 2 deletions cmd/run/xctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ var xctestCmd = &cobra.Command{
}
log.Println("Read env:", testEnv)
}

util.CheckMount(device)
output, stopTest, err2 := device.XCTest(xcTestBundleID, giDevice.WithXCTestEnv(testEnv))
if err2 != nil {
fmt.Printf("xctest start failed: %s", err2)
Expand Down
1 change: 0 additions & 1 deletion cmd/screenshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ var screenshotCmd = &cobra.Command{
if device == nil {
os.Exit(0)
}
util.CheckMount(device)
bytes, err := device.Screenshot()
if err != nil {
return util.NewErrorPrint(util.ErrSendCommand, "screenshot", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var versionCmd = &cobra.Command{
Short: "Version code of sib",
Long: "Version code of sib",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("1.1.3")
fmt.Println("1.1.4")
},
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ go 1.18
require (
github.com/electricbubble/gidevice v0.6.2
github.com/mitchellh/mapstructure v1.5.0
github.com/satori/go.uuid v1.2.0
github.com/spf13/cobra v1.4.0
)

require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
howett.net/plist v1.0.0 // indirect
)
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/electricbubble/gidevice v0.6.0 h1:SUIv/wI0/RnrUeVVIK/RUsFSQcQx+0QHBfuyNBZYC+4=
github.com/electricbubble/gidevice v0.6.0/go.mod h1:bRHL2M9qgeEKju8KRvKMZUVEg7t5zMnTiG3SJ3QDH5o=
github.com/electricbubble/gidevice v0.6.2 h1:eIeCHH7Xn5fTwnUv3qL8c7L4anKIHtjlTBkgr1LDVTc=
github.com/electricbubble/gidevice v0.6.2/go.mod h1:bRHL2M9qgeEKju8KRvKMZUVEg7t5zMnTiG3SJ3QDH5o=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
Expand Down
3 changes: 3 additions & 0 deletions src/util/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func GetDeviceByUdId(udId string) (device giDevice.Device) {
fmt.Println("no device connected")
return nil
}
if device != nil {
CheckMount(device)
}
return
}

Expand Down

0 comments on commit bdc60b3

Please sign in to comment.