Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: AbstractionFactory <[email protected]>
  • Loading branch information
abstractionfactory committed Sep 11, 2024
1 parent dc139c4 commit 82fb7fa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/cmd/generate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func main() {
if runtime.GOOS == "windows" {
binaryName += ".exe"
}
ghToken := os.Getenv("GITHUB_TOKEN")
tofuBinaryPath := path.Join("internal", "moduleindex", "moduleschema", "testtofu", binaryName)
s3Params := factory.S3Parameters{
AccessKey: os.Getenv("AWS_ACCESS_KEY_ID"),
Expand Down Expand Up @@ -100,7 +101,6 @@ func main() {
}
}

ghToken := os.Getenv("GITHUB_TOKEN")
backendFactory, err := factory.New(mainLogger, ghToken)
if err != nil {
mainLogger.Error(ctx, err.Error())
Expand Down
1 change: 1 addition & 0 deletions backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ require (
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/apparentlymart/go-shquot v0.0.1 // indirect
github.com/aws/aws-sdk-go v1.55.5 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.15 // indirect
Expand Down
2 changes: 2 additions & 0 deletions backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/apparentlymart/go-shquot v0.0.1 h1:MGV8lwxF4zw75lN7e0MGs7o6AFYn7L6AZaExUpLh0Mo=
github.com/apparentlymart/go-shquot v0.0.1/go.mod h1:lw58XsE5IgUXZ9h0cxnypdx31p9mPFIVEQ9P3c7MlrU=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func buildTofu(repoDir string, testTofuDir string, binaryPath string) {
return
}
if _, err := os.Stat(repoDir); err != nil {
runCommand(testTofuDir, "git", "clone", "https://github.com/opentofu/opentofu.git", repoDir)
runCommand(testTofuDir, "git", "clone", "https://github.com/opentofu/opentofu.git", "--shallow", repoDir)
}
runCommand(repoDir, "git", "pull")
runCommand(repoDir, "git", "checkout", "experiment/json_config_dump")
runCommand(repoDir, "go", "build", "-o", filepath.ToSlash(binaryPath), "github.com/opentofu/opentofu/cmd/tofu")
runCommand(repoDir, "go", "build", "-o", filepath.ToSlash(binaryPath), "./cmd/tofu/main.go")
}

func runCommand(wd string, argv ...string) {
Expand Down

0 comments on commit 82fb7fa

Please sign in to comment.