Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cli/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
)

const (
agentVersionIOS = "0.0.24"
agentVersionIOS = "0.0.25"
agentVersionAndroid = "1.2.6"
iosRunnerBundleID = "com.mobilenext.devicekit-iosUITests.xctrunner"
androidPackageName = "com.mobilenext.devicekit"
)

// pinned SHA-256 checksums for agent artifacts, keyed by download filename
var agentChecksums = map[string]string{
"devicekit-ios-Sim-arm64.zip": "72b11809b7e3bb24aaa23f24458bb28bb859967b31fa9dd0a46db2fc080f6915",
"devicekit-ios-Sim-x86_64.zip": "aaac190073188c48b3cbc03bcdb4536ab24db2b530187b3ea6878ade3ef821ea",
"devicekit-ios-runner.ipa": "40483399f3a1a1173d8edb932ea3d836edd641b4a1dfd42f7fd7d4618db7b3f6",
"devicekit-ios-Sim-arm64.zip": "37d08baaca14bd31a739619571c5a7a80781827379b119a3f55c77692124f61b",
"devicekit-ios-Sim-x86_64.zip": "6e77a0c05830e950de1b2ffa2406933927f2df6bae849b4030be760e1b334d33",
"devicekit-ios-runner.ipa": "3fea84ac75c3cdabc5479169742f54aaf198f213cdc1c778ef16c16aeb22431c",
"devicekit.apk": "01d933a311dac113bb89f2cb3256482467c1e02b287a2fd5e412863b8f907c51",
}

Expand Down Expand Up @@ -217,7 +217,7 @@
return fmt.Errorf("failed to download agent: %w", err)
}
utils.Verbose("downloaded agent to %s", tmpPath)
defer func() { _ = os.Remove(tmpPath) }()

Check failure on line 220 in cli/agent.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `os.Remove` is not checked (errcheck)

filename := filepath.Base(tmpPath)
expectedHash, ok := agentChecksums[filename]
Expand All @@ -240,7 +240,7 @@
if err != nil {
return err
}
defer func() { _ = os.Remove(installPath) }()

Check failure on line 243 in cli/agent.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `os.Remove` is not checked (errcheck)
}

utils.Verbose("installing agent on device %s", device.ID())
Expand All @@ -266,7 +266,7 @@
if err != nil {
return fmt.Errorf("failed to create temp directory: %w", err)
}
defer func() { _ = os.RemoveAll(tmpDir) }()

Check failure on line 269 in cli/agent.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `os.RemoveAll` is not checked (errcheck)

return downloadAndInstallAgent(device, agentURL, filepath.Join(tmpDir, filename), nil)
}
Expand All @@ -279,7 +279,7 @@
if err != nil {
return fmt.Errorf("failed to create temp directory: %w", err)
}
defer func() { _ = os.RemoveAll(tmpDir) }()

Check failure on line 282 in cli/agent.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `os.RemoveAll` is not checked (errcheck)

return downloadAndInstallAgent(device, agentURL, filepath.Join(tmpDir, filename), func(downloaded string) (string, error) {
utils.Verbose("re-signing agent with provisioning profile %s", agentProvisioningProfile)
Expand All @@ -299,7 +299,7 @@
if err != nil {
return fmt.Errorf("failed to create temp directory: %w", err)
}
defer func() { _ = os.RemoveAll(tmpDir) }()

Check failure on line 302 in cli/agent.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `os.RemoveAll` is not checked (errcheck)

return downloadAndInstallAgent(device, agentURL, filepath.Join(tmpDir, filename), nil)
}
Expand Down
Loading