Skip to content

Commit 4ff911c

Browse files
committed
here goes nothing
1 parent 9c09ede commit 4ff911c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

subsystem.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"path"
1414
"path/filepath"
1515
"regexp"
16+
"runtime"
1617
"sync"
1718
"syscall"
1819
"time"
@@ -230,6 +231,16 @@ func (s *AgentSubsystem) SaveCache() error {
230231
return s.saveCache()
231232
}
232233

234+
// hardcoding for now pending release process for windows rdk (not sure how discovery loop works).
235+
// replace with normal process asap.
236+
var staticWindowsViamServer = &pb.SubsystemUpdateInfo{
237+
Filename: "viam-server-amd64.exe",
238+
Url: "https://storage.googleapis.com/packages.viam.com/temp/viam-server-windows-amd64-alpha-1-546e6603.exe",
239+
Version: "alpha-1",
240+
Sha256: []byte("b8b999ab26c7156a62beccbb7e039b66f5fdb762b535dbbc369c3865832ed179"),
241+
Format: pb.PackageFormat_PACKAGE_FORMAT_EXECUTABLE,
242+
}
243+
233244
// Update is the main function of the AgentSubsystem wrapper, as it's shared between subsystems. Returns true if a restart is needed.
234245
//
235246
//nolint:gocognit
@@ -253,7 +264,11 @@ func (s *AgentSubsystem) Update(ctx context.Context, cfg *pb.DeviceSubsystemConf
253264

254265
updateInfo := cfg.GetUpdateInfo()
255266
if updateInfo == nil {
256-
return false, errNilUpdateInfo
267+
if runtime.GOOS == "windows" {
268+
updateInfo = staticWindowsViamServer
269+
} else {
270+
return false, errNilUpdateInfo
271+
}
257272
}
258273

259274
// check if we already have the version given by the cloud

0 commit comments

Comments
 (0)