Files
zeekay 83a37a3684 the IOM entity does not appear on a public surface
Lux Partners Limited is the Isle of Man company. Lux Industries Inc, a
Delaware C corporation, is the company these sites belong to, so it is the
one they name — in metadata, copyright, and the press items that record who
signed. The fund site names Lux Assets Management LLC, which is its own
company.

Two sentences were rewritten rather than renamed, because a name was doing
work a name cannot do. One claimed an Isle of Man domicile the naming entity
does not have. The other said a company acts on behalf of another; with one
entity left it said a company acts on behalf of itself.

The Isle of Man stays everywhere it is a JURISDICTION the product supports —
the regulatory package, the jurisdiction guides, the compliance tables. Only
this company's own identity changed.
2026-08-28 13:16:04 -07:00

90 lines
2.1 KiB
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package workflow
import (
"fmt"
"path/filepath"
"github.com/go-git/go-git/v5/plumbing/transport/http"
"github.com/spf13/afero"
"github.com/luxfi/lpm/git"
"github.com/luxfi/lpm/state"
"github.com/luxfi/lpm/util"
)
var _ Workflow = &Update{}
type UpdateConfig struct {
Executor Executor
TmpPath string
PluginPath string
Installer Installer
RepositoriesPath string
Auth http.BasicAuth
RepoFactory state.RepositoryFactory
Fs afero.Fs
StateFile state.File
Git git.Factory
}
func NewUpdate(config UpdateConfig) *Update {
return &Update{
executor: config.Executor,
tmpPath: config.TmpPath,
pluginPath: config.PluginPath,
installer: config.Installer,
repositoriesPath: config.RepositoriesPath,
auth: config.Auth,
repoFactory: config.RepoFactory,
fs: config.Fs,
stateFile: config.StateFile,
git: config.Git,
}
}
type Update struct {
executor Executor
installer Installer
auth http.BasicAuth
tmpPath string
pluginPath string
repositoriesPath string
repoFactory state.RepositoryFactory
fs afero.Fs
git git.Factory
stateFile state.File
}
func (u Update) Execute() error {
updated := 0
fmt.Printf("Checking for updates...\n")
for alias, sourceInfo := range u.stateFile.Sources {
organization, repo := util.ParseAlias(alias)
previousCommit := sourceInfo.Commit
repositoryPath := filepath.Join(u.repositoriesPath, organization, repo)
latestCommit, err := u.git.GetRepository(sourceInfo.URL, repositoryPath, sourceInfo.Branch, &u.auth)
if err != nil {
return err
}
if latestCommit != previousCommit {
fmt.Printf("Updated definitions for %s@%s.\n", alias, latestCommit)
updated++
}
u.stateFile.Sources[alias].Commit = latestCommit
}
if updated == 0 {
fmt.Printf("All repositories are already up-to-date.\n")
}
return nil
}