Skip to content

Commit

Permalink
regenerate lock/flake files post search
Browse files Browse the repository at this point in the history
Signed-off-by: House <house@buildsafe.dev>
  • Loading branch information
dr-housemd committed Jul 11, 2024
1 parent fcc0fa8 commit 3745380
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 32 deletions.
6 changes: 3 additions & 3 deletions bsf.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

packages {
development = ["go@1.21.6", "gotools@0.16.1", "delve@1.22.0", "go-task@~3.37.2"]
development = ["go@1.21.6", "gotools@0.16.1", "delve@1.22.0", "go-task@~3.37.2", "golangci-lint@~1.59.0"]
runtime = ["cacert@3.95"]
}

Expand All @@ -12,8 +12,8 @@ gomodule {
doCheck = false
}


githubRelease "bsf" {
owner = "buildsafedev"
repo = "bsf"
}
dir = ""
}
101 changes: 72 additions & 29 deletions bsf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"packages": [
{
"package": {
"name": "delve",
"revision": "a731d0cb71c58f56895f71a5b02eda2962a46746",
"version": "1.22.0",
"description": "debugger for the Go programming language",
"homepage": "https://github.com/go-delve/delve",
"name": "golangci-lint",
"revision": "7445ccd775d8b892fc56448d17345443a05f7fb4",
"version": "1.59.0",
"description": "Fast linters Runner for Go",
"homepage": "https://golangci-lint.run/",
"free": true,
"spdx_id": "MIT",
"epoch_seconds": 1705066566,
"spdx_id": "GPL-3.0-or-later",
"epoch_seconds": 1716993062,
"platforms": [
"x86_64-darwin",
"i686-darwin",
Expand All @@ -38,21 +38,24 @@
"riscv64-linux",
"s390-linux",
"s390x-linux",
"x86_64-linux"
]
"x86_64-linux",
"wasm64-wasi",
"wasm32-wasi"
],
"attr_name": "golangci-lint"
},
"runtime": false
},
{
"package": {
"name": "gotools",
"revision": "ac5c1886fd9fe49748d7ab80accc4c847481df14",
"version": "0.16.1",
"description": "Additional tools for Go development",
"homepage": "https://go.googlesource.com/tools",
"name": "go-task",
"revision": "7445ccd775d8b892fc56448d17345443a05f7fb4",
"version": "3.37.2",
"description": "A task runner / simpler Make alternative written in Go",
"homepage": "https://taskfile.dev/",
"free": true,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1699289668,
"spdx_id": "MIT",
"epoch_seconds": 1716993062,
"platforms": [
"x86_64-darwin",
"i686-darwin",
Expand All @@ -78,21 +81,24 @@
"riscv64-linux",
"s390-linux",
"s390x-linux",
"x86_64-linux"
]
"x86_64-linux",
"wasm64-wasi",
"wasm32-wasi"
],
"attr_name": "go-task"
},
"runtime": false
},
{
"package": {
"name": "go-task",
"revision": "7445ccd775d8b892fc56448d17345443a05f7fb4",
"version": "3.37.2",
"description": "A task runner / simpler Make alternative written in Go",
"homepage": "https://taskfile.dev/",
"name": "delve",
"revision": "a731d0cb71c58f56895f71a5b02eda2962a46746",
"version": "1.22.0",
"description": "debugger for the Go programming language",
"homepage": "https://github.com/go-delve/delve",
"free": true,
"spdx_id": "MIT",
"epoch_seconds": 1716993062,
"epoch_seconds": 1705066566,
"platforms": [
"x86_64-darwin",
"i686-darwin",
Expand All @@ -118,11 +124,8 @@
"riscv64-linux",
"s390-linux",
"s390x-linux",
"x86_64-linux",
"wasm64-wasi",
"wasm32-wasi"
],
"attr_name": "go-task"
"x86_64-linux"
]
},
"runtime": false
},
Expand Down Expand Up @@ -255,6 +258,46 @@
]
},
"runtime": true
},
{
"package": {
"name": "gotools",
"revision": "ac5c1886fd9fe49748d7ab80accc4c847481df14",
"version": "0.16.1",
"description": "Additional tools for Go development",
"homepage": "https://go.googlesource.com/tools",
"free": true,
"spdx_id": "BSD-3-Clause",
"epoch_seconds": 1699289668,
"platforms": [
"x86_64-darwin",
"i686-darwin",
"aarch64-darwin",
"armv7a-darwin",
"aarch64-linux",
"armv5tel-linux",
"armv6l-linux",
"armv7a-linux",
"armv7l-linux",
"i686-linux",
"loongarch64-linux",
"m68k-linux",
"microblaze-linux",
"microblazeel-linux",
"mips-linux",
"mips64-linux",
"mips64el-linux",
"mipsel-linux",
"powerpc64-linux",
"powerpc64le-linux",
"riscv32-linux",
"riscv64-linux",
"s390-linux",
"s390x-linux",
"x86_64-linux"
]
},
"runtime": false
}
]
}
2 changes: 2 additions & 0 deletions bsf/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.delve
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.go
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs.go-task
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs.golangci-lint
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs.gotools

];
Expand Down Expand Up @@ -109,6 +110,7 @@
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.delve
nixpkgs-a731d0cb71c58f56895f71a5b02eda2962a46746-pkgs.go
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs.go-task
nixpkgs-7445ccd775d8b892fc56448d17345443a05f7fb4-pkgs.golangci-lint
nixpkgs-ac5c1886fd9fe49748d7ab80accc4c847481df14-pkgs.gotools

];
Expand Down
7 changes: 7 additions & 0 deletions cmd/search/constraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strings"

"github.com/buildsafedev/bsf/cmd/styles"
"github.com/buildsafedev/bsf/pkg/generate"
"github.com/buildsafedev/bsf/pkg/hcl2nix"
"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
Expand Down Expand Up @@ -142,5 +143,11 @@ func (m *versionConstraintsModel) updateVersionConstraint() (tea.Model, tea.Cmd)
return m, tea.Quit
}

err = generate.Generate(fh, sc)
if err != nil {
m.errorMsg = fmt.Sprintf(errorStyle.Render("Error regenerating nix files: %s", err.Error()))
return m, tea.Quit
}

return m, tea.Quit
}

0 comments on commit 3745380

Please sign in to comment.