-
Notifications
You must be signed in to change notification settings - Fork 402
/
binaries.go
40 lines (37 loc) · 1.1 KB
/
binaries.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
package versioncontrol
// SupportedBinaries list of supported binary schemes.
var SupportedBinaries = []string{
"identity_darwin_amd64",
"identity_freebsd_amd64",
"identity_linux_amd64",
"identity_linux_arm",
"identity_linux_arm64",
"identity_windows_amd64",
"storagenode-updater_linux_amd64",
"storagenode-updater_linux_arm",
"storagenode-updater_linux_arm64",
"storagenode-updater_windows_amd64",
"storagenode_freebsd_amd64",
"storagenode_linux_amd64",
"storagenode_linux_arm",
"storagenode_linux_arm64",
"storagenode_windows_amd64",
"uplink_darwin_amd64",
"uplink_freebsd_amd64",
"uplink_linux_amd64",
"uplink_linux_arm",
"uplink_linux_arm64",
"uplink_windows_amd64",
}
// isBinarySupported check if binary scheme matching provided service, os and arch is supported.
func isBinarySupported(service, os, arch string) (string, bool) {
binary := service + "_" + os + "_" + arch
for _, supportedBinary := range SupportedBinaries {
if binary == supportedBinary {
return binary, true
}
}
return binary, false
}