Skip to content

Commit

Permalink
here goes nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
abe-winter committed Jan 1, 2025
1 parent 9c09ede commit 4ff911c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion subsystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"path"
"path/filepath"
"regexp"
"runtime"
"sync"
"syscall"
"time"
Expand Down Expand Up @@ -230,6 +231,16 @@ func (s *AgentSubsystem) SaveCache() error {
return s.saveCache()
}

// hardcoding for now pending release process for windows rdk (not sure how discovery loop works).
// replace with normal process asap.
var staticWindowsViamServer = &pb.SubsystemUpdateInfo{
Filename: "viam-server-amd64.exe",
Url: "https://storage.googleapis.com/packages.viam.com/temp/viam-server-windows-amd64-alpha-1-546e6603.exe",
Version: "alpha-1",
Sha256: []byte("b8b999ab26c7156a62beccbb7e039b66f5fdb762b535dbbc369c3865832ed179"),
Format: pb.PackageFormat_PACKAGE_FORMAT_EXECUTABLE,
}

// Update is the main function of the AgentSubsystem wrapper, as it's shared between subsystems. Returns true if a restart is needed.
//
//nolint:gocognit
Expand All @@ -253,7 +264,11 @@ func (s *AgentSubsystem) Update(ctx context.Context, cfg *pb.DeviceSubsystemConf

updateInfo := cfg.GetUpdateInfo()
if updateInfo == nil {
return false, errNilUpdateInfo
if runtime.GOOS == "windows" {

Check failure on line 267 in subsystem.go

View workflow job for this annotation

GitHub Actions / Test lint and build

string `windows` has 3 occurrences, make it a constant (goconst)
updateInfo = staticWindowsViamServer
} else {
return false, errNilUpdateInfo
}
}

// check if we already have the version given by the cloud
Expand Down

0 comments on commit 4ff911c

Please sign in to comment.