Merge branch 'temp-merge-branch'
This commit is contained in:
commit
a095c95be0
4 changed files with 14 additions and 5 deletions
|
|
@ -66,12 +66,13 @@ func (app *AppState) RunJsonDeployment() []PipelineStep {
|
|||
|
||||
jsonFile := app.Config.DeploymentFile
|
||||
if jsonFile == "" {
|
||||
log.Fatal("no config specified with --deployment-file=<path_to_config_file>")
|
||||
log.Fatal("no config specified with [-f|--deployment-file]=<path_to_config_file>")
|
||||
}
|
||||
|
||||
file, err := os.Open(jsonFile)
|
||||
if err != nil {
|
||||
slog.Error(fmt.Sprintf("Failed to open JSON file: %s", err))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
defer file.Close()
|
||||
|
|
@ -212,8 +213,6 @@ func (app *AppState) CreatePipeline() error {
|
|||
slog.Info(fmt.Sprintln("Project name added:", app.Customer.Project))
|
||||
fmt.Printf("Port number assigned: %d\n", port)
|
||||
app.Config.Port = port
|
||||
} else {
|
||||
slog.Info(fmt.Sprintln("Project name already exists:", app.Customer.Project))
|
||||
}
|
||||
|
||||
err = app.SetUpNewCustomer()
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ func RunCommand(command string) error {
|
|||
for scanner.Scan() {
|
||||
line := scanner.Text()
|
||||
stderr.WriteString(line + "\n")
|
||||
slog.Error(line)
|
||||
slog.Info(line)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import (
|
|||
"os"
|
||||
)
|
||||
|
||||
const Version = "v0.0.4"
|
||||
|
||||
type BaseConfig struct {
|
||||
ProjectsDirectory string `json:"projects_directory"`
|
||||
Env string `json:"env"`
|
||||
|
|
@ -38,6 +40,8 @@ func ReadBaseConfig(path string) (BaseConfig, error) {
|
|||
deploymentFileShorthand := flag.String("f", "", "shorthand for -deployment-file")
|
||||
|
||||
helpFlag := flag.Bool("help", false, "show help")
|
||||
versionFlag := flag.Bool("version", false, "show version")
|
||||
vFlag := flag.Bool("v", false, "show version (shorthand)")
|
||||
flag.Parse()
|
||||
|
||||
if *helpFlag {
|
||||
|
|
@ -46,6 +50,12 @@ func ReadBaseConfig(path string) (BaseConfig, error) {
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
// Handle version flags
|
||||
if *versionFlag || *vFlag {
|
||||
fmt.Println("infctl-cli version:", Version)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
var config BaseConfig
|
||||
if *deploymentFileShorthand != "" {
|
||||
config.DeploymentFile = *deploymentFileShorthand
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y software-properties-common git vim python3.10-venv
|
||||
sudo apt-get install -y software-properties-common git vim python3.10-venv jq
|
||||
|
||||
# Set up ansible environment for vagrant user
|
||||
sudo -u vagrant mkdir -p /home/vagrant/.ansible
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue