From 79b5a6e6624cb91afd929edab55b3b892b4fd209 Mon Sep 17 00:00:00 2001 From: Tom Peltonen Date: Sat, 9 Aug 2025 15:32:16 +1000 Subject: [PATCH] Improvements to template and configs --- .../golang/.well-known/devops.json | 26 ++++++++ .../golang/.well-known/qaskx-config.yaml | 60 +++++++++++-------- .../project/definitions/golang/README_QX.md | 57 ++++++++++++++++++ _generator/default/project/goblueprint.json | 10 +++- 4 files changed, 128 insertions(+), 25 deletions(-) create mode 100644 _generator/default/project/definitions/golang/README_QX.md diff --git a/_generator/default/project/definitions/golang/.well-known/devops.json b/_generator/default/project/definitions/golang/.well-known/devops.json index 247552c..1c77731 100644 --- a/_generator/default/project/definitions/golang/.well-known/devops.json +++ b/_generator/default/project/definitions/golang/.well-known/devops.json @@ -35,6 +35,19 @@ "url": "" }, "build": [ + { + "activity": { + "category": "BUILD", + "id": "make", + "name": "Make command", + "url": "" + }, + "config": "", + "guide": "", + "id": "make:build", + "platform": "windows", + "script": "--file Makefile build" + }, { "activity": { "category": "BUILD", @@ -161,6 +174,19 @@ "version": "0.0.1" }, "test": [ + { + "activity": { + "category": "TEST", + "id": "make", + "name": "Make command", + "url": "" + }, + "config": "", + "guide": "", + "id": "make:test", + "platform": "windows", + "script": "--file Makefile test" + }, { "activity": { "category": "TEST", diff --git a/_generator/default/project/definitions/golang/.well-known/qaskx-config.yaml b/_generator/default/project/definitions/golang/.well-known/qaskx-config.yaml index 5126b3d..9e4bcc4 100644 --- a/_generator/default/project/definitions/golang/.well-known/qaskx-config.yaml +++ b/_generator/default/project/definitions/golang/.well-known/qaskx-config.yaml @@ -38,74 +38,86 @@ scan: regex: [] activities: engines: - - osEnvironment: windows - category: BUILD + - category: BUILD + osEnvironment: windows + id: "make" + name: Make command + command: "make.exe" + option: "" + - category: BUILD + osEnvironment: windows id: '*default' name: Default Windows engine command: pwsh.exe option: -Command - - osEnvironment: windows - category: BUILD + - category: BUILD + osEnvironment: windows id: pwsh-command name: "" command: pwsh.exe option: -Command - - osEnvironment: windows - category: BUILD + - category: BUILD + osEnvironment: windows id: pwsh-script name: "" command: pwsh.exe option: -File - - osEnvironment: windows - category: BUILD + - category: BUILD + osEnvironment: windows id: cmd-command name: "" command: cmd.exe option: "" - - osEnvironment: windows - category: BUILD + - category: BUILD + osEnvironment: windows id: no-command name: "" command: '*null' option: "" - - osEnvironment: linux - category: BUILD + - category: BUILD + osEnvironment: linux id: '*default' name: Default Linux engine command: /bin/sh option: -c - - osEnvironment: linux - category: BUILD + - category: BUILD + osEnvironment: linux id: pwsh-command name: "" command: pwsh option: -Command - - osEnvironment: linux - category: BUILD + - category: BUILD + osEnvironment: linux id: pwsh-script name: "" command: pwsh option: -File - - osEnvironment: darwin - category: BUILD + - category: BUILD + osEnvironment: darwin id: '*default' name: "" command: /bin/sh option: -c - - osEnvironment: windows - category: TEST + - category: TEST + osEnvironment: windows + id: "make" + name: Make command + command: "make.exe" + option: "" + - category: TEST + osEnvironment: windows id: '*default' name: Default Windows engine command: pwsh.exe option: -Command - - osEnvironment: windows - category: TEST + - category: TEST + osEnvironment: windows id: pwsh-command name: "" command: pwsh.exe option: -Command - - osEnvironment: windows - category: TEST + - category: TEST + osEnvironment: windows id: pwsh-script name: "" command: pwsh.exe diff --git a/_generator/default/project/definitions/golang/README_QX.md b/_generator/default/project/definitions/golang/README_QX.md new file mode 100644 index 0000000..0f043a7 --- /dev/null +++ b/_generator/default/project/definitions/golang/README_QX.md @@ -0,0 +1,57 @@ +# Project + +One Paragraph of project description goes here + +## Getting Started + +These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. + +## MakeFile + +Build the application + +```bash +qaskx-cli run -t make:build +``` + +Run the application + +```bash +make run +``` + +Create DB container + +```bash +make docker-run +``` + +Shutdown DB Container + +```bash +make docker-down +``` + +DB Integrations Test: + +```bash +make itest +``` + +Live reload the application: + +```bash +make watch +``` + +Run the test suite: + +```bash +qaskx-cli run -t make:test +``` + +Clean up binary from the last build: + +```bash +make clean +``` diff --git a/_generator/default/project/goblueprint.json b/_generator/default/project/goblueprint.json index 8282c1e..4308951 100644 --- a/_generator/default/project/goblueprint.json +++ b/_generator/default/project/goblueprint.json @@ -17,7 +17,7 @@ "id": "goblueprint", "script": "go-blueprint", "pre":[ - "create --name distribute_message --framework echo --driver sqlite --advanced --feature docker --git commit" + "create --name distribute_message --framework echo --driver sqlite --advanced --feature docker --git skip" ], "post": [] } @@ -38,6 +38,14 @@ "post": [] } }, + { + "engine": "", + "section": "", + "folder": "{{.TemplateDefinition.SelfFolder}}/definitions/golang", + "file_name": "*", + "output_folder": "^/", + "output_name": "*" + }, { "engine": "", "section": "",