From 855021e9279e4e66c70a2e7a0d5375af453c8eef Mon Sep 17 00:00:00 2001 From: Aiden Fine Date: Fri, 27 Feb 2026 14:18:40 -0500 Subject: [PATCH] add source at end of template file and remove bash selection --- .gitignore | 1 + Makefile | 2 +- confs/orbstack-foreman.yml.tmpl | 3 +++ foreman-builder/cmd/create.go | 19 +++++++++---------- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index beba834..ccbd16d 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ go.work.sum #config files *.yaml *.yml +/build # Editor/IDE diff --git a/Makefile b/Makefile index cdabc0d..d613e40 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: build test build: - go build + go build -o "build/foreman-builder" test: go test ./... \ No newline at end of file diff --git a/confs/orbstack-foreman.yml.tmpl b/confs/orbstack-foreman.yml.tmpl index 899e558..418c80d 100644 --- a/confs/orbstack-foreman.yml.tmpl +++ b/confs/orbstack-foreman.yml.tmpl @@ -70,6 +70,9 @@ runcmd: sed -i 's|/home/vagrant|/home/{{ .Username }}|g; s|user: vagrant|user: {{ .Username }}|g; s|group: vagrant|group: {{ .Username }}|g' /etc/foreman-installer/scenarios.d/katello-devel-answers.yaml - foreman-installer --scenario katello-devel -v --no-colors + #source + - source ~/.bashrc + write_files: - path: /home/{{ .Username }}/.bashrc.d/custom.sh owner: {{ .Username }}:{{ .Username }} diff --git a/foreman-builder/cmd/create.go b/foreman-builder/cmd/create.go index fc081d2..209ff37 100644 --- a/foreman-builder/cmd/create.go +++ b/foreman-builder/cmd/create.go @@ -11,7 +11,6 @@ import ( "strings" foremanbuilder "github.com/aidenfine/foreman-builder/foreman-builder" - tea "github.com/charmbracelet/bubbletea" "github.com/spf13/cobra" ) @@ -52,18 +51,18 @@ func runCreate() { containerName = "foreman" } - p := tea.NewProgram(initialOpts()) - finalOpts, err := p.Run() - if err != nil { - fmt.Printf("Alas, there's been an error: %v", err) - os.Exit(1) - } - m := finalOpts.(opts) + // p := tea.NewProgram(initialOpts()) + // finalOpts, err := p.Run() + // if err != nil { + // fmt.Printf("Alas, there's been an error: %v", err) + // os.Exit(1) + // } + // m := finalOpts.(opts) // currently will not do anything - selectedShell := m.choices[m.cursor] + // selectedShell := m.choices[m.cursor] - fmt.Println("Selected Shell", selectedShell) + // fmt.Println("Selected Shell", selectedShell) log.Printf("Starting enviornment creation ")